hgtools 3.0.2

Classes and setuptools plugin for Mercurial repositories
hgtools builds on the setuptools_hg plugin for setuptools. It provides classes for inspecting and working with repositories in the Mercurial version control system.

hgtools provides a plugin for setuptools that enables setuptools to find files under the Mercurial version control system.

The classes provided by hgtools are designed to work natively with the Mercurial Python libraries (in process) or fall back to using the command-line program hg(1) if available. The command-line support is especially useful inside virtualenvs that don't have access to a system-wide installed Mercurial lib (i.e. when the virtualenv was created with --no-site-packages).

Note:

The setuptools feature

You can read about the setuptools plugin provided by hgtools in the setuptools 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 hgtools:

from setuptools import setup, find_packages
setup(
 name="HelloWorld",
 version="0.1",
 packages=find_packages(),
 setup_requires=["hgtools"],
)


If you run the setup.py above, 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 (though it will then fall back to the native libraries if the command is not available or fails to run).

last updated on:
May 17th, 2012, 0:31 GMT
price:
FREE!
homepage:
bitbucket.org
license type:
GPL (GNU General Public License) 
developed by:
Jannis Leidel and Jason R. Coombs
category:
ROOT \ Programming \ Version Control
hgtools
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!
What's New in This Release:
  • Restored Python 2.6 compatibility in reentry module.
read full changelog

Add your review!

SUBMIT