Commit 41854a0e authored by Martin v. Löwis's avatar Martin v. Löwis

Add src_root attribute to support installing from a copy.

--HG--
branch : distribute
extra : rebase_source : 95242b20ab228862aeef205f399869f79e342f0e
parent 96c97c7b
...@@ -157,9 +157,11 @@ class build_py(_build_py): ...@@ -157,9 +157,11 @@ class build_py(_build_py):
_build_py.initialize_options(self) _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): def exclude_data_files(self, package, src_dir, files):
......
...@@ -210,6 +210,7 @@ class Distribution(_Distribution): ...@@ -210,6 +210,7 @@ class Distribution(_Distribution):
self.require_features = [] self.require_features = []
self.features = {} self.features = {}
self.dist_files = [] self.dist_files = []
self.src_root = attrs.pop("src_root")
self.patch_missing_pkg_info(attrs) self.patch_missing_pkg_info(attrs)
# Make sure we have any eggs needed to interpret 'attrs' # Make sure we have any eggs needed to interpret 'attrs'
if attrs is not None: if attrs is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment