Skip to content

Instantly share code, notes, and snippets.

@paitonic
Last active August 29, 2015 14:17
Show Gist options
  • Save paitonic/39ae6d0426d2b7123b78 to your computer and use it in GitHub Desktop.
Save paitonic/39ae6d0426d2b7123b78 to your computer and use it in GitHub Desktop.
Python package recipe

Sources

Differences between distribute, distutils, setuptools and distutils2?

Why does setup.py develop not work?

Removing python module installed in develop mode

Install virtualenv

$ pip install virtualenv

Create virtual environment

$ virtualenv .venv

Install setuptools (a distutils enhancement)

setuptools

Create setup.py

from setuptools import setup

setup(name='Python Package'
      version='0.1',
      description='Python Package',
      author='Author',
      author_email='Email',
      url='',
      py_modules=['pkg.mod1', 'pkg.mod2'],
     )

Install package in development mode

$ python setup.py develop

Uninstall package from the development mode

$ python setup.py develop --uninstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment