Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#219 Ft.Lib.DistExt.PackageManager fails during build - v1.0.2

open
nobody
5
2009-05-02
2009-05-02
Howard B. Golden
No

The design of Ft.Lib.DistExt.PackageManager assumes that all packages in one's system will meet the Distutils StrictVersion definition. Unfortunately, this isn't always true. I suggest that the code be made more accepting of other version schemes.

As a workaround, you can remove all packages from your system that have non-StrictVersion version numbers. Then you can build/install 4Suite. After this is done, you can reinstall the packages you had to remove.

Here is an example of the failure traceback:

Traceback (most recent call last):
File "./setup.py", line 88, in <module>
requires_python=['>=2.2.1'],
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/__init__.py", line 48, in setup
return _setup(**attrs)
File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/PackageManager.py", line 548, in run_commands
for dist in self.get_distributions():
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/PackageManager.py", line 422, in get_distributions
distributions = self._sort_distributions(distributions)
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/PackageManager.py", line 479, in _sort_distributions
installed_provides.update(get_provides(package))
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/PackageManager.py", line 469, in get_provides
package_version = Version.CommonVersion(package.get_version())
File "/usr/lib64/python2.6/distutils/version.py", line 40, in __init__
self.parse(vstring)
File "/var/tmp/portage/dev-python/4suite-1.0.2-r1/work/4Suite-XML-1.0.2/Ft/Lib/DistExt/Version.py", line 57, in parse
raise ValueError("invalid version number: %r" % vstring)
ValueError: invalid version number: 'WORKING'

This is because I had happydoc-3.1 installed and its version "number" was WORKING, which failed the StrictVersion definition.

Discussion