changeset 15458:c3a6ec304055

setup: subclass distribution instead of overwriting original
author Simon Heimberg <simohe@besonet.ch>
date Sat, 23 Jul 2011 05:57:39 +0200
parents 1470f8b00694
children 434c48e981b8
files setup.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Wed Nov 09 16:36:54 2011 -0600
+++ b/setup.py	Sat Jul 23 05:57:39 2011 +0200
@@ -221,9 +221,13 @@
 # when build_py is run next.
 build.sub_commands.insert(0, ('build_mo', None))
 
-Distribution.pure = 0
-Distribution.global_options.append(('pure', None, "use pure (slow) Python "
-                                    "code instead of C extensions"))
+class hgdist(Distribution):
+    pure = 0
+
+    global_options = Distribution.global_options + \
+                     [('pure', None, "use pure (slow) Python "
+                        "code instead of C extensions"),
+                     ]
 
 class hgbuildext(build_ext):
 
@@ -435,6 +439,7 @@
       data_files=datafiles,
       package_data=packagedata,
       cmdclass=cmdclass,
+      distclass=hgdist,
       options=dict(py2exe=dict(packages=['hgext', 'email']),
                    bdist_mpkg=dict(zipdist=True,
                                    license='COPYING',