Bug 957577
Summary: | Current initialisation of bkr.__version__ is not appropriate for a namespace package | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Nick Coghlan <ncoghlan> |
Component: | command line | Assignee: | Nick Coghlan <ncoghlan> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 0.12 | CC: | asaha, dcallagh, llim, qwan, rglasz, rmancy, xjia |
Target Milestone: | 0.13 | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-06-25 06:27:12 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
Nick Coghlan
2013-04-29 05:01:28 UTC
Note that, for backwards compatibility, the line in bkr/__init__.py that currently sets the version can be replaced with: from bkr.common import __version__ That way bkr.__version__ can still be used to access the version information, it just gets set indirectly in order to ensure that a system installation and a source checkout can share a common __init__ file for the namespace package without conflict. On Gerrit: http://gerrit.beaker-project.org/#/c/1978/ Previous patch broke the RPM build. New patch that properly treats bkr as a stateless namespace package: http://gerrit.beaker-project.org/#/c/1991/ More fixes from Dan to get local builds working on RHEL 6 when an RPM is also installed : http://gerrit.beaker-project.org/#/c/2000/ I believe this is finally sorted now... [root@beaker-devel ~]# python Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pkg_resources >>> from bkr.common import __version__ >>> bkr.common.__version__ Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'bkr' is not defined >>> import bkr >>> bkr.common.__version__ '0.12.1' >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> [root@beaker-devel ~]# rpm -qa | grep beaker beaker-server-0.12.1-1.git.177.5d4e6bf.el6.noarch beaker-server-redhat-0.1.14-1.el6eng.noarch beaker-0.12.1-1.git.177.5d4e6bf.el6.noarch Beaker 0.13.1 has been released. |