pip-patches / options-for-editable

# HG changeset patch
# Parent 7f57b700d9cc20af9182dad73a3951850aa5e823
support install/global options for editables

diff --git a/pip/req.py b/pip/req.py
--- a/pip/req.py
+++ b/pip/req.py
@@ -531,7 +531,7 @@ execfile(__file__)
     def install(self, install_options, global_options=()):
         if self.editable:
-            self.install_editable()
+            self.install_editable(install_options, global_options)
         temp_location = tempfile.mkdtemp('-record', 'pip-')
         record_filename = os.path.join(temp_location, 'install-record.txt')
@@ -603,15 +603,17 @@ execfile(__file__)
             self._temp_build_dir = None
-    def install_editable(self):
+    def install_editable(self, install_options, global_options=()):
         logger.notify('Running setup.py develop for %s' % self.name)
         logger.indent += 2
             ## FIXME: should we do --install-headers here too?
                 [sys.executable, '-c',
-                 "import setuptools; __file__=%r; execfile(%r)" % (self.setup_py, self.setup_py),
-                 'develop', '--no-deps'], cwd=self.source_dir, filter_stdout=self._filter_install,
+                 "import setuptools; __file__=%r; execfile(%r)" % (self.setup_py, self.setup_py)]
+                + list(global_options) + ['develop', '--no-deps'] + list(install_options),
+                cwd=self.source_dir, filter_stdout=self._filter_install,
             logger.indent -= 2
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.