I've recently begun packaging my first project with SetupTools, and have mostly been successful.
Unfortunately, I've run into a confusing situation - my project depends on a single-file module which isn't available on PyPI. I've been able to configure setup.py to depend on that module easily, using the dependency_links option, and everything works... so long as I'm using setup.py to install it. If I try to use pip to install the project egg, it fails while trying to install the module, assuming that it must be a pre-made egg archive. In comparison, setup.py detects that it's a simple source file and generates an egg from that.
My aim is to have my project available on PyPI, so it's important that it be installable using just pip; so my question is... am I doing something wrong?
My understanding was that setuptools is essentially a means to an end, that end being pip and PyPI, so it seems very strange to me that the two tools should behave so differently.
The relevant part of setup.py and output from each tool follows:
setup( name='particle-fish', version='0.1.0', description='Python Boilerplate contains all the boilerplate you need to create a Python package.', long_description=readme + '\n\n' + history, author='Lachlan Pease', author_email='[email protected]', url='https://github.com/predakanga/particle-fish', packages=[ 'particle.plugins' ], include_package_data=True, install_requires=['particle', 'irccrypt', 'pycrypto'], dependency_links=['http://www.bjrn.se/code/irccrypt/irccrypt.py#egg=irccrypt-1.0'], license="BSD", zip_safe=False, keywords='particle-fish', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', ], test_suite='tests', tests_require=['pytest', 'mock', 'coverage', 'pytest-cov'], cmdclass = {'test': PyTest}, ) Output from setup.py install:
Installed /Users/lachlan/.virtualenvs/particle-fish/lib/python2.7/site-packages/particle_fish-0.1.0-py2.7.egg Processing dependencies for particle-fish==0.1.0 Searching for irccrypt Best match: irccrypt 1.0 Downloading http://www.bjrn.se/code/irccrypt/irccrypt.py#egg=irccrypt-1.0 Processing irccrypt.py Writing /var/tmp/easy_install-svPfHF/setup.cfg Running setup.py -q bdist_egg --dist-dir /var/tmp/easy_install-svPfHF/egg-dist-tmp-Xq3OCt zip_safe flag not set; analyzing archive contents... Adding irccrypt 1.0 to easy-install.pth file Output from pip install:
Downloading/unpacking irccrypt (from particle-fish==0.1.0) Downloading irccrypt.py Cannot unpack file /private/var/tmp/pip-mCc6La-unpack/irccrypt.py (downloaded from /Users/lachlan/.virtualenvs/particle-staging/build/irccrypt, content-type: text/plain); cannot detect archive format Cleaning up... Cannot determine archive format of /Users/lachlan/.virtualenvs/particle-staging/build/irccrypt