[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command develop.py, 1.1, 1.2

pje@users.sourceforge.net pje at users.sourceforge.net
Thu Jul 7 03:58:01 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11447/setuptools/command

Modified Files:
	develop.py 
Log Message:
Don't modify .pth files when in --dry-run/-n mode.


Index: develop.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/develop.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- develop.py	6 Jul 2005 03:46:16 -0000	1.1
+++ develop.py	7 Jul 2005 01:57:59 -0000	1.2
@@ -4,41 +4,6 @@
 from distutils import log
 import sys, os
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 class develop(easy_install):
     """Set up package for development"""
 
@@ -59,10 +24,21 @@
 
     command_consumes_arguments = False  # override base
 
+    def run(self):
+        if self.uninstall:
+            self.multi_version = True
+            self.uninstall_link()
+        else:
+            self.install_for_development()
+
     def initialize_options(self):
         self.uninstall = None
         easy_install.initialize_options(self)
 
+
+
+
+
     def finalize_options(self):
         ei = self.get_finalized_command("egg_info")
         self.args = [ei.egg_name]
@@ -78,15 +54,6 @@
             name = ei.egg_name
         )
 
-
-
-    def run(self):
-        if self.uninstall:
-            self.multi_version = True
-            self.uninstall_link()
-        else:
-            self.install_for_development()
-
     def install_for_development(self):
         # Ensure metadata is up-to-date
         self.run_command('egg_info')
@@ -108,6 +75,11 @@
         # and handling requirements
         self.process_distribution(None, self.dist)
 
+
+
+
+
+
     def uninstall_link(self):
         if os.path.exists(self.egg_link):
             log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)
@@ -117,10 +89,12 @@
                 return
             if not self.dry_run:
                 os.unlink(self.egg_link)
-        self.update_pth(self.dist)  # remove any .pth link to us
+        if not self.dry_run:
+            self.update_pth(self.dist)  # remove any .pth link to us
         if self.distribution.scripts:
             log.warn("Note: you must uninstall or replace scripts manually!")
 
+
     def install_egg_scripts(self, dist):
         if dist is not self.dist:
             # Installing a dependency, so fall back to normal behavior
@@ -147,18 +121,3 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-



More information about the Python-checkins mailing list