hgtools

Classes and setuptools plugin for Mercurial repositories
Download

hgtools Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Jannis Leidel and Jason R. Coombs
  • Publisher web site:
  • http://jaraco.com

hgtools Tags


hgtools Description

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 featureYou 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).UsageHere's an example of a setup.py that uses hgtools:from setuptools import setup, find_packagessetup( name="HelloWorld", version="0.1", packages=find_packages(), setup_requires=,)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.OptionsSet 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). Requirements: · Python


hgtools Related Software