summaryrefslogtreecommitdiff
path: root/pbr/packaging.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-01-28 06:57:06 -0800
committerMonty Taylor <mordred@inaugust.com>2015-02-03 17:05:30 -0500
commit1457aafa6095da4e33a6eb0a52218f077d991a67 (patch)
tree44ed6690b91bb1d4003b50a3b486c081a832ba71 /pbr/packaging.py
parentaef4f7ef4faec987d553d1ca40b55951235af0b1 (diff)
downloadpbr-1457aafa6095da4e33a6eb0a52218f077d991a67.tar.gz
Support script text override for newer develop0.10.8
setuptools > 12 has a new flow for writing out generated script text. It's nicer, actually, because it means we can just subclass and extend one method instead of monekypatching. Closes-Bug: 1415106 Change-Id: I56e7bea60df8a59d859575d426ce93c45ffee314
Diffstat (limited to 'pbr/packaging.py')
-rw-r--r--pbr/packaging.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py
index 9a8f1c5..592ad32 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -30,6 +30,7 @@ import sys
from distutils.command import install as du_install
from distutils import log
import pkg_resources
+from setuptools.command import develop
from setuptools.command import easy_install
from setuptools.command import egg_info
from setuptools.command import install
@@ -321,6 +322,18 @@ def override_get_script_args(
yield (name, header + script_text)
+class LocalDevelop(develop.develop):
+
+ command_name = 'develop'
+
+ def install_wrapper_scripts(self, dist):
+ if sys.platform == 'win32':
+ return develop.develop.install_wrapper_scripts(self, dist)
+ if not self.exclude_scripts:
+ for args in override_get_script_args(dist):
+ self.write_script(*args)
+
+
class LocalInstallScripts(install_scripts.install_scripts):
"""Intercepts console scripts entry_points."""
command_name = 'install_scripts'