aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_py.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-09-12 12:36:46 +0200
committerMartin v. Löwis <martin@v.loewis.de>2009-09-12 12:36:46 +0200
commit41854a0e9535b9142811e7815937d15c1a7c5b1a (patch)
tree3448eb15e7ad19e60ec35ff663749813f9a71aca /setuptools/command/build_py.py
parent96c97c7b38ffe815a6f1cc6e76fea1d627610d60 (diff)
downloadexternal_python_setuptools-41854a0e9535b9142811e7815937d15c1a7c5b1a.tar.gz
external_python_setuptools-41854a0e9535b9142811e7815937d15c1a7c5b1a.tar.bz2
external_python_setuptools-41854a0e9535b9142811e7815937d15c1a7c5b1a.zip
Add src_root attribute to support installing from a copy.
--HG-- branch : distribute extra : rebase_source : 95242b20ab228862aeef205f399869f79e342f0e
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r--setuptools/command/build_py.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py
index 79570bc2..3fce7693 100644
--- a/setuptools/command/build_py.py
+++ b/setuptools/command/build_py.py
@@ -157,9 +157,11 @@ class build_py(_build_py):
_build_py.initialize_options(self)
-
-
-
+ def get_package_dir(self, package):
+ res = _build_py.get_package_dir(self, package)
+ if self.distribution.src_root is not None:
+ return os.path.join(self.distribution.src_root, res)
+ return res
def exclude_data_files(self, package, src_dir, files):