How can I make setuptools install a package that’s not on PyPI?

The key is to tell easy_install where the package can be downloaded. In this particular case, it can be found at the url http://github.com/mtai/python-gearman/tarball/master. However, that link by itself won’t work, because easy_install can’t tell just by looking at the URL what it’s going to get. By changing it to http://github.com/mtai/python-gearman/tarball/master#egg=gearman-2.0.0beta instead, easy_install will be … Read more

Including non-Python files with setup.py

Probably the best way to do this is to use the setuptools package_data directive. This does mean using setuptools (or distribute) instead of distutils, but this is a very seamless “upgrade”. Here’s a full (but untested) example: from setuptools import setup, find_packages setup( name=”your_project_name”, version=’0.1′, description=’A description.’, packages=find_packages(exclude=[‘ez_setup’, ‘tests’, ‘tests.*’]), package_data={”: [‘license.txt’]}, include_package_data=True, install_requires=[], ) … Read more

Differences between distribute, distutils, setuptools and distutils2?

As of May 2022, most of the other answers to this question are several years out-of-date. When you come across advice on Python packaging issues, remember to look at the date of publication, and don’t trust out-of-date information. The Python Packaging User Guide is worth a read. Every page has a “last updated” date displayed, … Read more