diff options
author | PJ Eby <distutils-sig@python.org> | 2005-11-04 03:08:30 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-11-04 03:08:30 +0000 |
commit | 0db70c291a7cbe8ec9d1f509c2508b008f4fe1c9 (patch) | |
tree | a729940d95250bb414bb72ee92d0cd2cdc3a62c5 /setuptools/command/develop.py | |
parent | d092afc47ef99d19ab6f1dbb8b3b14c50edf3eb7 (diff) | |
download | external_python_setuptools-0db70c291a7cbe8ec9d1f509c2508b008f4fe1c9.tar.gz external_python_setuptools-0db70c291a7cbe8ec9d1f509c2508b008f4fe1c9.tar.bz2 external_python_setuptools-0db70c291a7cbe8ec9d1f509c2508b008f4fe1c9.zip |
Made ``develop`` command accept all the same options as ``easy_install``,
and use the ``easy_install`` command's configuration settings as defaults.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041394
Diffstat (limited to 'setuptools/command/develop.py')
-rwxr-xr-x | setuptools/command/develop.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index f767ac4a..a1f2e763 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -9,23 +9,14 @@ class develop(easy_install): description = "install package in 'development mode'" - user_options = [ - ("install-dir=", "d", "link package from DIR"), - ("script-dir=", "s", "create script wrappers in DIR"), - ("multi-version", "m", "make apps have to require() a version"), - ("exclude-scripts", "x", "Don't install scripts"), - ("always-copy", "a", "Copy all needed dependencies to install dir"), + user_options = easy_install.user_options + [ ("uninstall", "u", "Uninstall this source package"), ] - boolean_options = [ - 'multi-version', 'exclude-scripts', 'always-copy', 'uninstall' - ] + boolean_options = easy_install.boolean_options + ['uninstall'] command_consumes_arguments = False # override base - negative_opt = {} - def run(self): if self.uninstall: self.multi_version = True @@ -37,11 +28,21 @@ class develop(easy_install): self.uninstall = None easy_install.initialize_options(self) + # Pull in any easy_install configuration options + self.distribution._set_command_options( + self, self.distribution.get_option_dict('easy_install') + ) + + + + + def finalize_options(self): ei = self.get_finalized_command("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 @@ -57,13 +58,11 @@ class develop(easy_install): def install_for_development(self): # Ensure metadata is up-to-date self.run_command('egg_info') - ei = self.get_finalized_command("egg_info") # Build extensions in-place self.reinitialize_command('build_ext', inplace=1) self.run_command('build_ext') - # create an .egg-link in the installation dir, pointing to our egg log.info("Creating %s (link to %s)", self.egg_link, self.egg_base) if not self.dry_run: @@ -80,6 +79,7 @@ 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) @@ -92,6 +92,7 @@ class develop(easy_install): if not self.dry_run: self.update_pth(self.dist) # remove any .pth link to us if self.distribution.scripts: + # XXX should also check for entry point scripts! log.warn("Note: you must uninstall or replace scripts manually!") @@ -120,4 +121,3 @@ class develop(easy_install): - |