setuptools for mercurial-0.9.5

James Mills prologic at shortcircuit.net.au
Wed Oct 17 19:54:27 UTC 2007


On Wed, Oct 17, 2007 at 11:22:46AM -0500, Matt Mackall wrote:
> I don't remember seeing your patch the first time around, but I'm not
> against the idea. We do like to avoid adding additional dependencies
> wherever possible though, so fallinging back to distutils is the way
> to go.

# HG changeset patch
# User James Mills
# Date 1192650786 -36000
# Node ID 05d813070589b7606b607c4c9c98f0509d37a864
# Parent  3b204881f95927d1522484e67dbd9f947c46ba29
setup.py: setuptools support for building python egg distributions

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -10,12 +10,22 @@ if not hasattr(sys, 'version_info') or s
     raise SystemExit, "Mercurial requires python 2.3 or later."
 
 import os
-from distutils.core import setup, Extension
+
+extra = {}
+
+try:
+	from setuptools import setup, Extension
+	extra["entry_points"] = """
+[console_scripts]
+hg = mercurial.dispatch:run
+"""
+except ImportError:
+	from distutils.core import setup, Extension
+
 from distutils.command.install_data import install_data
 
 import mercurial.version
 
-extra = {}
 
 # py2exe needs to be installed to work
 try:

-- 
--
-"Problems are Solved by Method"
-
- James Mills <prologic at shortcircuit.net.au>
- HomePage: http://shortcircuit.net.au/~prologic/
- IRC: irc://shortcircuit.net.au#se

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the Mercurial-devel mailing list