Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Setuptools/distribute plugin for finding files under Mercurial version control.

Project description

setuptools_hg is a plugin for setuptools/distribute to enable it to find files under the Mercurial version control system.

It uses the Mercurial Python library by default and falls back to use the command line programm hg(1). That’s especially useful inside virtualenvs that don’t have access to the system wide installed Mercurial lib (e.g. when created with --no-site-packages).


The setuptools feature

You can read about the hooks used by setuptool_hg in the setuptools or distribute documentation. It basically returns a list of files that are under Mercurial version control when running the setup function, e.g. if you create a source and binary distribution. It’s a simple yet effective way of not having to define package data (non-Python files) manually in MANIFEST templates (


Here’s an example of a that uses setuptools_hg:

from setuptools import setup, find_packages


If you run this setuptools will automatically download setuptools_hg to the directory where the is located at (and won’t install it anywhere else) to get all package data files from the Mercurial repository.


Set the HG_SETUPTOOLS_FORCE_CMD environment variable before running if you want to enforce the use of the hg command. “””



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for setuptools_hg, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size setuptools_hg-0.4.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page