From: kiorky <ki...@cr...> - 2009-10-11 09:40:47
|
Hi, The problem is fixed although the solution used is far for optimal and even dirty for me: * Duplication around current version, my pkg_resources call in the proposed patch was not there to make things nicer, Think that if you want to use that, you can't import the module with version bites in the setup.py because at install time, your distribution will not be already registered with the setuptools machinery and you will get some DistributionNotFoundError unless you had a previous markdown installation (silent error). * False commit messages """ Fixed a silly bug in setup.py. Importing version from the lib requires that all dependencaies for the lib are present, so we can't actuly import the lib until after we check for dependencies - which means we can't import version in the setup script. Grrr. We'll have to remember to update the version number in both places from now on. Sigh. """ It's not true [1]. The real problem, i think was an ImportError at install time (ElementTree?) resulting on an unavailability of the module. That was one of the purposes of my provided patch also... * Another error is to mixing setuptools and distutils, AFAIK, install_requires is on setuptools side. That may be why Waylan did not spoil me this new release. [1] See how i can import things there and there. (m)kiorky@judith ~/test $ tree |-- mylib | |-- __init__.py | |-- version.py `-- setup.py (m)kiorky@judith ~/test $ cat setup.py #!/usr/bin/env python __docformat__ = 'restructuredtext en' from setuptools import setup, find_packages from mylib.version import version setup( name = 'mylib', version = version, packages = find_packages(), include_package_data=True, install_requires=["zc.buildout"], ) # vim:set et sts=4 ts=4 tw=80: (m)kiorky@judith ~/test $ cat mylib/version.py version='1.0' ---------> sdist does not complain about mylib.version call (m)kiorky@judith ~/test $ python setup.py sdist running sdist tar -cf dist/mylib-1.0.tar mylib-1.0 gzip -f9 dist/mylib-1.0.tar removing 'mylib-1.0' (and everything under it) ----------> neither setuptools (Distribute there) (m)kiorky@judith ~/test $ easy_install -U dist/mylib-1.0.tar.gz ... Installed /home/kiorky/m/lib/python2.4/site-packages/mylib-1.0-py2.4.egg ... Installed /home/kiorky/m/lib/python2.4/site-packages/zc.buildout-1.4.1-py2.4.egg ... Finished processing dependencies for mylib==1.0 (m)kiorky@judith ~/test $ python -c "from mylib.version import version;print version" 1.0 Yuri Takhteyev a écrit : > Waylan released a new version (2.0.3) a few days ago. Did this fix the problem? > > - yuri -- -- Cordialement, KiOrKY GPG Key FingerPrint: 0x1A1194B7681112AF |