Unable to install python-daemon as a dependency from dependant's setup.py

Maarten van Gompel proycon at anaproy.nl
Tue Jun 21 15:57:15 UTC 2016


Hello,

I am encountering a problem installing python-daemon when invoking the setup.py
install of a project that depends on python-daemon. I see this issue was reported earlier
but not resolved yet:
 - http://lists.alioth.debian.org/pipermail/python-daemon-devel/2015-August/000122.html
 - Also: https://groups.google.com/forum/#!topic/luigi-user/idABqyNXA0Y

The steps outlined in the latter post serve to reproduce the problem:

    $ virtualenv venv-luigi
    $ source venv-luigi/bin/activate
    $ cd venv-luigi
    $ git clone https://github.com/spotify/luigi
    $ cd luigi
    $ python setup.py install

This breaks with the following message:

    Installed /tmp/venv-luigi/lib/python3.5/site-packages/luigi-2.1.1-py3.5.egg
    Processing dependencies for luigi==2.1.1
    Searching for python-daemon<3.0
    Reading https://pypi.python.org/simple/python-daemon/
    Best match: python-daemon 2.1.1
    Downloading
    https://pypi.python.org/packages/ae/e4/82870b5e01d761a04597fa332e4aaf285acfa1e675350fda55c6686f16ef/python-daemon-2.1.1.tar.gz#md5=72e2acf2c3d69c7fa75a6625d06adfd0
    Processing python-daemon-2.1.1.tar.gz
    Writing /tmp/easy_install-mwc_1f_d/python-daemon-2.1.1/setup.cfg
    Running python-daemon-2.1.1/setup.py -q bdist_egg --dist-dir
    /tmp/easy_install-mwc_1f_d/python-daemon-2.1.1/egg-dist-tmp-31_u0lro
    warning: no files found matching 'MANIFEST'
    warning: no files found matching '*' under directory 'extras'
    warning: no previously-included files matching '.cvsignore' found under
    directory '*'
    warning: no previously-included files matching '*.pyc' found under directory
    '*'
    warning: no previously-included files matching '*~' found under directory '*'
    warning: no previously-included files matching '.DS_Store' found under
    directory '*'
    copy/convert test suite
    zip_safe flag not set; analyzing archive contents...
    docutils.parsers.rst.directives.__pycache__.misc.cpython-35: module references
    __file__
    docutils.writers.__pycache__.docutils_xml.cpython-35: module references
    __path__
    docutils.writers.html4css1.__pycache__.__init__.cpython-35: module references
    __file__
    docutils.writers.pep_html.__pycache__.__init__.cpython-35: module references
    __file__
    docutils.writers.s5_html.__pycache__.__init__.cpython-35: module references
    __file__
    docutils.writers.latex2e.__pycache__.__init__.cpython-35: module references
    __file__
    docutils.writers.odf_odt.__pycache__.__init__.cpython-35: module references
    __file__

    Installed
    /tmp/easy_install-mwc_1f_d/python-daemon-2.1.1/.eggs/docutils-0.12-py3.5.egg
    /tmp/venv-luigi/lib/python3.5/site-packages/setuptools/dist.py:294:
    UserWarning: The version specified ('UNKNOWN') is an invalid version, this may
    not work as expected with newer versions of setuptools, pip, and PyPI. Please
    see PEP 440 for more details.
    "details." % self.metadata.version
    creating
    /tmp/venv-luigi/lib/python3.5/site-packages/python_daemon-UNKNOWN-py3.5.egg
    Extracting python_daemon-UNKNOWN-py3.5.egg to
    /tmp/venv-luigi/lib/python3.5/site-packages
    Adding python-daemon UNKNOWN to easy-install.pth file

    Installed
    /tmp/venv-luigi/lib/python3.5/site-packages/python_daemon-UNKNOWN-py3.5.egg
    error: The 'python-daemon<3.0' distribution was not found and is required by luigi

Luigi's setup.py is quite straightforward, listing 'python-daemon<3.0' under
install_requires, so I the problem must be in python-daemon's more complex
setup.py, I suspect it to be in the part that attempts to import and obtain a
version number. A part of this fails the first time, although I don't know why.

However, When running setup.py install a *second* time, i.e. immediately after failure, it
does succeed (I assume because it can import the earlier UNKNOWN version and
bootstrap from that?):

    creating /tmp/venv-luigi/lib/python3.5/site-packages/python_daemon-2.1.1-py3.5.egg
    Extracting python_daemon-2.1.1-py3.5.egg to /tmp/venv-luigi/lib/python3.5/site-packages
    Removing python-daemon UNKNOWN from easy-install.pth file
    Adding python-daemon 2.1.1 to easy-install.pth file

Though the workaround provides a way around the issue, this bug breaks any automated installation
workflow (i.e. automated tests on travis-ci), so I'm hoping it can be resolved.

Kind regards,

--

Maarten van Gompel
    Centre for Language Studies
    Radboud Universiteit Nijmegen

proycon at anaproy.nl
http://proycon.anaproy.nl
http://github.com/proycon

GnuPG key:  0x1A31555C  XMPP: proycon at anaproy.nl
Telegram:   proycon     IRC: proycon (freenode)
Twitter:    https://twitter.com/proycon
Bitcoin:    1BRptZsKQtqRGSZ5qKbX2azbfiygHxJPsd



More information about the python-daemon-devel mailing list