Best tool to create python distribution with dependencies / resources

So, I was working on a python project and got to the point that I need to make some kind of installer / distribution. Now this project has quite a few dependencies and some resources. So far I am trying to create setup.py, but things like scipy, matplotlib or even numpy have some problems with easy_install. This should now be a cross-platform installer / distribution / exe, but starting with mac-os / linux will also be fine. Now I googled around and Enstaller or Distribute, it seems alternatives to setuptools and py2exe / pyinstaller also seem to be useful. Now I really do not want to start and fight everyone and, probably, not go anywhere, so my question is what do you recommend for this, given that the number of dependencies and resources is quite large?

Regards, Bogdan

+4
source share
1 answer

I don't know if this is really needed, but for python based packaging

You can use pastescript to create your setup.py (or create a skeleton / project template)

Setup.py example

plain

from setuptools import setup, find_packages setup( name = "google killer", version = "0.1.0", url = 'http://example.com/', license = 'AGPL', description = 'best software ever', author = 'me', packages = find_packages('src'), package_dir = {'': 'src'}, install_requires = ['numpy', 'scipy', 'sqlalchemy'], ) 

complex. made pastescript in a pyramid project

 import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = ['pyramid', 'WebError'] setup(name='test', version='0.0', description='test', long_description=README + '\n\n' + CHANGES, classifiers=[ "Programming Language :: Python", "Framework :: Pylons", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='', author_email='', url='', keywords='web pyramid pylons', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=requires, tests_require=requires, test_suite="test", entry_points = """\ [paste.app_factory] main = test:main """, paster_plugins=['pyramid'], ) 

you can find them in most python projects

Also, read the Hitchhiker's Guide to Packaging for a detailed explanation of the story (it is useful to use a quick start)

+3
source

All Articles