Bug 1208984 - get_version_from_scm=True in setup.py results in 0.0.0 module version
Summary: get_version_from_scm=True in setup.py results in 0.0.0 module version
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-execnet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-04 20:49 UTC by Pete Travis
Modified: 2017-07-12 17:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-20 17:12:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1470305 0 unspecified CLOSED RFE: drop hgdistver dependency 2021-02-22 00:41:40 UTC

Internal Links: 1470305

Description Pete Travis 2015-04-04 20:49:19 UTC
execnet-1.2.0's setup.py had "version=1.2.0".  The 1.3.0 setup.py has "get_version_from_scm=True".  Since the tarball in koji doesn't know about upstream SCM, there is no version info included with the build.  This breaks things that are looking for a specific version of python-execnet. 

For example, with python-natsort-3.5.5 `python setup.py test`:

from koji: 
   "Could not find suitable distribution for Requirement.parse('execnet>=1.1.dev1')" - https://kojipkgs.fedoraproject.org//work/tasks/5309/9415309/build.log

from goofing off in a mock shell:
"""
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 813, in resolve 
   raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (execnet 0.0.0 (/usr/lib/python2.7/site-packages), Requirement.parse('exe│9415307 build (rawhide, python-natsort-3.5.1-1.fc23.src.rpm) failed
cnet>=1.1.dev1'), set(['pytest-cache']))
"""

Please patch setup.py to explicitly declare the module version.

Comment 1 Thomas Moschny 2015-04-19 15:06:12 UTC
I cannot reproduce that.

Using a rebuild of python-execnet-1.3.0-1 on my F21 workstation:

$ python
Python 2.7.8 (default, Nov 10 2014, 08:19:18) 
[GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources import require
>>> require('execnet>=1.1.dev1')
[execnet 1.3.0 (/usr/lib/python2.7/site-packages)]
>>> 

Maybe you forgot to add the python-execnet / python3-execnet build-requirements?

Comment 2 Pete Travis 2015-04-19 19:24:25 UTC
https://kojipkgs.fedoraproject.org//work/tasks/5309/9415309/root.log goes with the cited build log; you can see that python{,3}-execnet is in the buildroot.

https://kojipkgs.fedoraproject.org//packages/python-execnet/1.3.0/1.fc23/data/logs/noarch/build.log is the build log for the package you're testing with.  I see:
"""
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'get_version_from_scm'
  warnings.warn(msg)
"""
Copying execnet.egg-info to /builddir/build/BUILDROOT/python-execnet-1.3.0-1.fc23.noarch/usr/lib/python2.7/site-packages/execnet-0.0.0-py2.7.egg-info
"""

The version info isn't coming through.  The eggs are unversioned, and setuptools isn't resolving the provides.  http://koji.fedoraproject.org/koji/taskinfo?taskID=9515040 shows the same package failing to build in rawhide, again due to execnet's missing version info.

On my F22 workstation:
$ sudo dnf update https://kojipkgs.fedoraproject.org//packag
es/python-execnet/1.3.0/1.fc23/noarch/python-execnet-1.3.0-1.fc23.noarch.rpm
$ python
Python 2.7.9 (default, Feb  6 2015, 14:42:41) 
[GCC 5.0.0 20150205 (Red Hat 5.0.0-0.7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources import require
>>> require('execnet>=1.1dev1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 918, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 810, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (execnet 0.0.0 (/usr/lib/python2.7/site-packages), Requirement.parse('execnet>=1.1dev1'))

Comment 3 Thomas Moschny 2015-04-20 17:12:16 UTC
Actually I had python-hgdistver installed locally.

So, I've re-added that as a dependency and did a rebuild, see http://koji.fedoraproject.org/koji/buildinfo?buildID=629539

The version information should be fine now.

Comment 4 José Matos 2015-04-21 09:57:19 UTC
Thank you. :-)

That allowed me to rebuild python-natsort for rawhide
http://koji.fedoraproject.org/koji/buildinfo?buildID=626260

allowing then to install the latest python-nikola.


Note You need to log in before you can comment on or make changes to this bug.