Pushing to pypi

DateReadtime 1 minutes Tags


  1. Make setup.py in your project

    from setuptools import setup
          description='thing do-er',
          author='Your Name',
          classifiers=['Environment :: Console',
                       'Intended Audience :: Developers',
                       'License :: OSI Approved :: MIT License',
                       'Programming Language :: Python :: 3.4',
                       'Operating System :: POSIX :: Linux',
                       'Topic :: Utilities', ],
          entry_points={'console_scripts': ['commandline = module:function'], }, )

    There is lots more that you can do in a setup.py file. This example aims to get you started with the bare minimum required.

  2. Make a pypi account

    If you do not already have a pypi account now is the time to make one.

    Try going to this form

  3. Make ~/.pypirc

    repository = https://pypi.python.org/pypi
    username = [your pypi account username]
    password = [your password]
  4. Make the egg file:

    python setup.py sdist
  5. Register the project:

    python setup.py register
  6. Upload the egg:

    python setup.py sdist upload

Additional Information

Classifiers List

For a full list of the pypi classifiers go here: https://pypi.python.org/pypi?%3Aaction=list_classifiers

New releases

Once you are ready to release a new version of your project, be sure to change the version and upload it with step 6