aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/develop.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-07-07 01:57:59 +0000
committerPJ Eby <distutils-sig@python.org>2005-07-07 01:57:59 +0000
commit87cf6767cf525bc6770b9317ce4b5f30c745dcf8 (patch)
tree0cc1e7cdf39763ff4d43261d04a3bef808fbf537 /setuptools/command/develop.py
parent6a241540966aab371e48413a7f8ace8d2257aa6f (diff)
downloadexternal_python_setuptools-87cf6767cf525bc6770b9317ce4b5f30c745dcf8.tar.gz
external_python_setuptools-87cf6767cf525bc6770b9317ce4b5f30c745dcf8.tar.bz2
external_python_setuptools-87cf6767cf525bc6770b9317ce4b5f30c745dcf8.zip
Don't modify .pth files when in --dry-run/-n mode.
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041085
Diffstat (limited to 'setuptools/command/develop.py')
-rwxr-xr-xsetuptools/command/develop.py79
1 files changed, 19 insertions, 60 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index fd9f2dfd..9ade5aaf 100755
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -4,41 +4,6 @@ from pkg_resources import Distribution, PathMetadata
from distutils import log
import sys, os
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
class develop(easy_install):
"""Set up package for development"""
@@ -59,10 +24,21 @@ class develop(easy_install):
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 @@ class develop(easy_install):
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 @@ class develop(easy_install):
# 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 @@ class develop(easy_install):
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 @@ class develop(easy_install):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-