summaryrefslogtreecommitdiff
path: root/setuptools/command/develop.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-12-30 16:35:42 +0000
committerPJ Eby <distutils-sig@python.org>2005-12-30 16:35:42 +0000
commit85605b38e205ac388efb17a9da2060f93120d00d (patch)
tree8b14f95d2c00befbb39e9c71c8aeff584c9b6959 /setuptools/command/develop.py
parent76ba007ce8836518b9f57c4ac5b8121a466f8b6e (diff)
downloadpython-setuptools-bitbucket-85605b38e205ac388efb17a9da2060f93120d00d.tar.gz
Allow most commands to work with an existing .egg-info directory w/a '-'
in it, but warn about it and refuse to run "develop" until the existing directory is renamed. This should allow older source distributions and checkouts to keep working with 0.6a9.
Diffstat (limited to 'setuptools/command/develop.py')
-rwxr-xr-xsetuptools/command/develop.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index b6e9d3c7..fafe60b5 100755
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -2,6 +2,7 @@ from setuptools.command.easy_install import easy_install
from distutils.util import convert_path
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
+from distutils.errors import *
import sys, os
class develop(easy_install):
@@ -38,11 +39,14 @@ class develop(easy_install):
-
def finalize_options(self):
ei = self.get_finalized_command("egg_info")
- self.args = [ei.egg_name]
-
+ if ei.broken_egg_info:
+ raise DistutilsError(
+ "Please rename %r to %r before using 'develop'"
+ % (ei.egg_info, ei.broken_egg_info)
+ )
+ self.args = [ei.egg_name]
easy_install.finalize_options(self)
self.egg_link = os.path.join(self.install_dir, ei.egg_name+'.egg-link')
self.egg_base = ei.egg_base
@@ -76,10 +80,6 @@ class develop(easy_install):
-
-
-
-
def uninstall_link(self):
if os.path.exists(self.egg_link):
log.info("Removing %s (link to %s)", self.egg_link, self.egg_base)