1. Jannis Leidel
  2. setuptools_hg

Commits

Jannis Leidel  committed 4ca0cc4

Automated commit message.

  • Participants
  • Parent commits d835ae4
  • Branches default

Comments (0)

Files changed (1)

File Home.wiki

View file
-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/jezdez/hgsetuptools/wiki/
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+== setuptools_hg ==
+
+setuptools_hg is a plugin for setuptools that enables setuptools 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 [[http://peak.telecommunity.com/DevCenter/setuptools#adding-support-for-other-revision-control-systems|setuptools documentation]]. It basically simply returns a list of files that are under Mercurial version control before running the setuptools function, such as creating source distributions and binary distribution like egg files. It's a simple yet effective way of not having to define package data (non-Python files) manually in MANIFEST templates (MANIFEST.in).
+
+Here's an example of a setup.py that uses setuptools_hg:
+
+{{{
+#!python
+
+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.
+