Opened 13 years ago
Last modified 12 years ago
#3912 enhancement new
Twisted version scheme differs whether setuptools is installed or not
Reported by: | tarek | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | release management | Keywords: | |
Cc: | Jean-Paul Calderone, Thijs Triemstra | Branch: | |
Author: |
Description
If setuptools is not installed, and if I build a trunk version using twisted setup script, I'll get a : "8.2.0+r27123" for the version number (cooked by twisted.python.versions.Version.short)
If setuptools is installed, it'll cook the version number and the output will differ and will be "8.2.0-r27123".
The behavior should be the same,
Change History (11)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
By the way there is another difference between the SVN revision number appended by setuptools and the one appended by twisted's internal version-number-cooking code. That is that if you commit a new patch to SVN on a different branch then the twisted revision number increments but the setuptools one doesn't. The setuptools one shows the most recent revision on *this* branch.
I would personally prefer it if (a) the Twisted way to cook version numbers happened to result in the same thing as the setuptools way to cook version numbers, for obvious (?) reasons of uniformity among other Python packages, and (b) Twisted didn't have a way to cook version numbers, but instead relied on some external tool whose sole job in life has to do with versioning and packaging and so on.
comment:3 Changed 13 years ago by
Cc: | Jean-Paul Calderone added |
---|---|
Priority: | normal → highest |
Hey, radix, please consider this issue and make a determination as to whether it needs to be resolved for Twisted 9.0.
comment:4 Changed 13 years ago by
Owner: | changed from radix to Jean-Paul Calderone |
---|
Was the nevow fix easy? Is the same fix applicable to Twisted? If so, then we can probably get it in really quickly. If someone does that, I'll review it.
comment:5 Changed 13 years ago by
Cc: | Thijs Triemstra added |
---|
comment:6 Changed 13 years ago by
The new fix was to disable the setuptools behavior even when setuptools was installed. The patch for Twisted would probably look something like this:
-
twisted/python/dist.py
80 80 if sys.version_info[:3] < (2, 3, 0): 81 81 kw['cmdclass']['build_py'] = build_py_twisted 82 82 83 try: 84 import setuptools 85 except ImportError,: 86 pass 87 else: 88 from distutils.command.sdist import sdist 89 setup_args['cmdclass'] = {'sdist': sdist} 90 83 91 if "conditionalExtensions" in kw: 84 92 extensions = kw["conditionalExtensions"] 85 93 del kw["conditionalExtensions"]
(but would probably also include unit tests).
comment:7 Changed 12 years ago by
Ticket #4138 involves customizing the sdist
command for other reasons, so it might wind up accidentally fixing this ticket too.
I had a look at setuptools' customized sdist and I can't see any evidence of it messing with version strings at all, so I'm not sure how replacing setuptools' sdist
with distutils' sdist
would help at all. Even if it did, it'd be a pretty difficult thing to write a test for, I think, unless the test was "shell out to 'python setup.py sdist'; look in dist/
and check what shows up", and even then you'd need a buildbot guaranteed to have setuptools installed, and one guaranteed not to.
A better solution might be to update t.p.versions
to construct PEP0386-compatible version strings, which presumably would be acceptable input to distutils or setuptools or distribute.
comment:8 Changed 12 years ago by
Milestone: | Twisted-10.0 |
---|
This issue wasn't necessary for the 9.0 release, and the 10.0 release is already frozen.
comment:9 Changed 12 years ago by
Summary: | Twisted version scheme differs wether setuptools is installed or not → Twisted version scheme differs whether setuptools is installed or not |
---|
comment:10 Changed 12 years ago by
Priority: | highest → normal |
---|
comment:11 Changed 11 years ago by
Owner: | Jean-Paul Calderone deleted |
---|
Arg I hate setuptools.
fwiw, Nevow had exactly the same problem. http://divmod.org/trac/ticket/2880