Bug 1351580

Summary: python-z3 provides faulty __init__.py file
Product: [Fedora] Fedora Reporter: Hanno Heinrichs <hanno.heinrichs>
Component: z3Assignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: loganjerry
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: z3-4.4.1-5.fc24 z3-4.4.1-5.fc23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 04:56:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hanno Heinrichs 2016-06-30 11:36:14 UTC
Description of problem:
The upstream Z3 project does not provide a __init__.py file. Thus, /usr/lib64/python2.7/site-packages/z3/ folder is not regcognized as a Python module. The Fedora maintainer then added an empty __init__.py file. However, this has the effect that you cannot use the textbook examples of Z3 Python bindings.

Version-Release number of selected component (if applicable):
4.4.1-2.fc23

How reproducible:
Always.

Steps to Reproduce:
1. # dnf install python-z3
2. Example from the documentation (https://github.com/Z3Prover/z3/blob/e518d4a5fe3b824d5e9deb3d16eb1faa248a52d8/README.md#python):
$ python -c 'import z3; print(z3.get_version_string())'

Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_version_string'

Expected results:
4.4.1

Additional info:
Current workaround:
$ python -c 'import z3.z3; print(z3.z3.get_version_string())'
4.4.1

The solution would be to put
> from z3 import * 
into the __init__.py file.

This is already tracked upstream: https://github.com/Z3Prover/z3/pull/630

Comment 1 Jerry James 2016-07-01 01:54:54 UTC
Thanks for letting me know how to fix this.  I will get new builds started tonight.

Comment 2 Fedora Update System 2016-07-01 04:44:29 UTC
z3-4.4.1-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-04c82b59fd

Comment 3 Fedora Update System 2016-07-01 04:44:34 UTC
z3-4.4.1-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0ee180313

Comment 4 Fedora Update System 2016-07-02 20:30:15 UTC
z3-4.4.1-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f0ee180313

Comment 5 Fedora Update System 2016-07-02 20:55:48 UTC
z3-4.4.1-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-04c82b59fd

Comment 6 Fedora Update System 2016-07-05 04:56:33 UTC
z3-4.4.1-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-07-12 02:25:07 UTC
z3-4.4.1-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.