setuptools_hg 0.4
Setuptools/distribute plugin for finding files under Mercurial version control.
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).
Note
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 (MANIFEST.in).
Usage
Here's an example of a setup.py that uses setuptools_hg:
from setuptools import setup, find_packages
setup(
name="HelloWorld",
version="0.1",
packages=find_packages(),
setup_requires=["setuptools_hg"],
)
If you run this setup.py setuptools will automatically download setuptools_hg to the directory where the setup.py is located at (and won't install it anywhere else) to get all package data files from the Mercurial repository.
Options
Set the HG_SETUPTOOLS_FORCE_CMD environment variable before running setup.py if you want to enforce the use of the hg command. """
CHANGES
0.4
- fix a bug if the current distribution is not versionned with mercurial. [kiorky]
- fix https://bitbucket.org/jezdez/setuptools_hg/issue/5/using-hg-command-line-with-py3-does-not [kiorky]
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| setuptools_hg-0.4.tar.gz (md5, pgp) | Source | 2012-02-02 | 10KB | 29702 | |
- Author: Jannis Leidel
- Home Page: http://bitbucket.org/jezdez/setuptools_hg/
- License: GPL2
-
Categories
- Development Status :: 5 - Production/Stable
- Framework :: Setuptools Plugin
- Intended Audience :: Developers
- License :: OSI Approved :: GNU General Public License (GPL)
- Operating System :: OS Independent
- Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.4
- Programming Language :: Python :: 2.5
- Programming Language :: Python :: 2.6
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3
- Programming Language :: Python :: 3.1
- Programming Language :: Python :: 3.2
- Topic :: Software Development :: Version Control
- Package Index Owner: jezdez
- DOAP record: setuptools_hg-0.4.xml
