[Python-checkins] distutils2: Add basic pysetup support.

tarek.ziade python-checkins at python.org
Sat Nov 13 18:32:53 CET 2010


tarek.ziade pushed d663a4a1575a to distutils2:

http://hg.python.org/distutils2/rev/d663a4a1575a
changeset:   819:d663a4a1575a
parent:      812:fe62b8ad3e13
user:        Alexis Metaireau <ametaireau at gmail.com>
date:        Fri Nov 12 23:47:44 2010 +0000
summary:     Add basic pysetup support.
files:       distutils2/pysetup, distutils2/run.py

diff --git a/distutils2/pysetup b/distutils2/pysetup
new file mode 100755
--- /dev/null
+++ b/distutils2/pysetup
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+from distutils2.run import main
+
+if __name__ == "__main__":
+    main()
diff --git a/distutils2/run.py b/distutils2/run.py
--- a/distutils2/run.py
+++ b/distutils2/run.py
@@ -63,7 +63,12 @@
         attrs['script_name'] = os.path.basename(sys.argv[0])
 
     if 'script_args' not in attrs:
-        attrs['script_args'] = sys.argv[1:]
+        if sys.argv[1] == "help":
+            script_args = sys.argv[2:]
+            script_args.append("--help")
+        else:
+            script_args = sys.argv[1:]
+        attrs['script_args'] = script_args
 
     # Create the Distribution instance, using the remaining arguments
     # (ie. everything except distclass) to initialize it

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list