This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

About

This is a plugin for setuptools that enables git integration. Once installed, Setuptools can be told to include in a package distribution all the files tracked by git. This is an alternative to explicit inclusion specifications with MANIFEST.in.

A package distribution here refers to a package that you create using setup.py, ex:

python setup.py sdist
python setup.py bdist_rpm
python setup.py bdist_egg

This package was formerly known as gitlsfiles. The name change is the result of an effort by the setuptools plugin developers to provide a uniform naming convention.

Installation

With easy_install:

easy_install setuptools_git

Alternative manual installation:

tar -zxvf setuptools_git-X.Y.Z.tar.gz
cd setuptools_git-X.Y.Z
python setup.py install

Where X.Y.Z is a version number.

Usage

To activate this plugin, you must first package your python module with setup.py and use setuptools. The former is well documented in the distutils manual.

To use setuptools instead of distutils, just edit setup.py and change:

from distutils.core import setup

to:

from setuptools import setup, find_packages

When Setuptools builds a source package, it always includes all files tracked by your revision control system, if it knows how to learn what those files are.

When Setuptools builds a binary package, you can ask it to include all files tracked by your revision control system, by adding these argument to your invocation of setup():

setup(...,
  packages=find_packages(),
  include_package_data=True,
  ...)

which will detect that a directory is a package if it contains a __init__.py file. Alternatively, you can do without __init__.py files and tell Setuptools explicitly which packages to process:

setup(...,
  packages=["a_package", "another_one"],
  include_package_data=True,
  ...)

This plugin lets setuptools know what files are tracked by your git revision control tool. Setuptools ships with support for cvs and subversion. Other plugins like this one are available for bzr, darcs, monotone, mercurial, and many others.

It might happen that you track files with your revision control system that you don’t want to include in your packages. In that case, you can prevent setuptools from packaging those files with a directive in your MANIFEST.in, ex:

exclude .gitignore
recursive-exclude images *.xcf *.blend

In this example, we prevent setuptools from packaging .gitignore and the Gimp and Blender source files found under the images directory.

Files to exclude from the package can also be listed in the setup() directive. To do the same as the MANIFEST.in above, do:

setup(...,
    exclude_package_data = {'': ['.gitignore'],
                      'images': ['*.xcf', '*.blend']},
    ...)

Here is another example:

setup(...,
  exclude_package_data = {'': ['.gitignore', 'artwork/*'],
                          'model': ['config.py']},
   ...)

Gotchas

Be aware that for this module to work properly, git and the git meta-data must be available. That means that if someone tries to make a package distribution out of a non-git distribution of yours, say a tarball, setuptools will lack the information necessary to know which files to include. A similar problem will happen if someone clones your git repository but does not install this plugin.

Resolving those problems is out of the scope of this plugin; you should add relevant warnings to your documentation if those situations are a concern to you.

You can make sure that anyone who clones your git repository and uses your setup.py file has this plugin by adding a setup_requires argument:

setup(...,
  setup_requires = [ "setuptools_git >= 0.3", ],
  ...)

References

Thanks to Zooko O’Whielacronx for many improvements to the documentation.

Release History

Release History

1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0b1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
setuptools-git-1.1.tar.gz (9.4 kB) Copy SHA256 Checksum SHA256 Source Aug 16, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting