summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools.txt23
-rwxr-xr-xsetuptools/command/develop.py28
2 files changed, 30 insertions, 21 deletions
diff --git a/setuptools.txt b/setuptools.txt
index ceb7eb31..41a2499c 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -1376,13 +1376,13 @@ rerunning ``develop``, but keep in mind that even minor changes to the setup
script (e.g. changing an entry point definition) require you to re-run the
``develop`` or ``test`` commands to keep the distribution updated.
-Here are the options that the ``develop`` command accepts. Note that they
-affect the project's dependencies as well as the project itself, so if you have
-dependencies that need to be installed and you use ``--exclude-scripts`` (for
-example), the dependencies' scripts will not be installed either! For this
-reason, you may want to use EasyInstall to install the project's dependencies
-before using the ``develop`` command, if you need finer control over the
-installation options for dependencies.
+Here are some of the options that the ``develop`` command accepts. Note that
+they affect the project's dependencies as well as the project itself, so if you
+have dependencies that need to be installed and you use ``--exclude-scripts``
+(for example), the dependencies' scripts will not be installed either! For
+this reason, you may want to use EasyInstall to install the project's
+dependencies before using the ``develop`` command, if you need finer control
+over the installation options for dependencies.
``--uninstall, -u``
Un-deploy the current project. You may use the ``--install-dir`` or ``-d``
@@ -1442,6 +1442,12 @@ installation options for dependencies.
a requirement can be met using a distribution that is already available in
a directory on ``sys.path``, it will not be copied to the staging area.
+In addition to the above options, the ``develop`` command also accepts all of
+the same options accepted by ``easy_install``. If you've configured any
+``easy_install`` settings in your ``setup.cfg`` (or other distutils config
+files), the ``develop`` command will use them as defaults, unless you override
+them in a ``[develop]`` section or on the command line.
+
.. _egg_info:
@@ -1942,6 +1948,9 @@ Release Notes/Change History
* Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG.
+ * Made ``develop`` command accept all the same options as ``easy_install``,
+ and use the ``easy_install`` command's configuration settings as defaults.
+
0.6a5
* Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests.
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):
-