Setuptools_git integrates Git with Setuptools as a plugin. This software summary concludes the functionality of the Setuptools_git software in 18 words.
Alternative to the previously named gitlsfiles, Setuptools_git is designed with a consistent naming convention in mind by the developers of Setuptools plugins. This solution is excellent if you're looking to create a Python module with a `setup.py` file. A package distribution refers to a package that has been created with setup.py. For example, executing the following command will generate a package:
python setup.py sdist
python setup.py bdist_rpm
python setup.py bdist_egg
Installing Setuptools_git is simple. Just use easy_install and enter the following command:
easy_install setuptools_git
You can also manually install Setuptools_git.
tar -zxvf setuptools_git-X.Y.Z.tar.gz
cd setuptools_git-X.Y.Z
python setup.py install
In both cases, replace X.Y.Z with the version number.
To use Setuptools_git, you first need to package your Python module using `setup.py`. If you're unsure of how to do this, refer to the distutils manual, as it is well-documented. Suppose you want to use setuptools instead of distutils. In that case, you must edit `setup.py` and change the following:
from distutils.core import setup
to
from setuptools import setup
Once setuptools builds the package, you can include all files tracked by your Git repository by adding this argument to your invocation of `setup()`:
setup(...,
include_package_data=True,
...)
This will allow setuptools to include all of the files tracked by your revision control system. Setuptools_git provides Git support. Setuptools also ships with support for CVS and Subversion.
Sometimes you may find that you've tracked files using your revision control system that you don't want to include in your package. In such cases, you can use a directive in your `MANIFEST.in` to avoid packaging those files. For example:
exclude .gitignore
recursive-exclude images *.xcf *.blend
Here we prevent setuptools from packing `.gitignore` and the GIMP and Blender source files found under the `images` directory. You can also list the files you want to exclude from your package in the `setup()` directive.
setup(...,
exclude_package_data = {'': ['.gitignore'],
'images': ['*.xcf', '*.blend']},
...)
In the latest release, documentation was significantly improved.
Version 0.3.3: N/A