summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-05-10 15:33:05 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-16 19:11:31 +0200
commit9ef5498e91ddf1af9c1dcefcb60499fc090125b8 (patch)
tree3a984aaaa2c11e3f4886ab77608fb121432b360a /eclass
parentpython-utils-r1.eclass: python_moduleinto, clarify relative path use (diff)
downloadgentoo-9ef5498e91ddf1af9c1dcefcb60499fc090125b8.tar.gz
gentoo-9ef5498e91ddf1af9c1dcefcb60499fc090125b8.tar.bz2
gentoo-9ef5498e91ddf1af9c1dcefcb60499fc090125b8.zip
python-utils-r1.eclass: python_moduleinto, allow package dot-notation
Allow specifying the relative package destination using the dot-notation used by Python itself (e.g. 'foo.bar') in addition to the directory form ('foo/bar'). Since dot can not be used in Python package names, this change is backwards-compatible.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index c594cb46b5f..863051337f0 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -810,7 +810,9 @@ python_newscript() {
# The <new-path> can either be an absolute target system path (in which
# case it needs to start with a slash, and ${ED} will be prepended to
# it) or relative to the implementation's site-packages directory
-# (then it must not start with a slash).
+# (then it must not start with a slash). The relative path can be
+# specified either using the Python package notation (separated by dots)
+# or the directory notation (using slashes).
#
# When not set explicitly, the modules are installed to the top
# site-packages directory.
@@ -867,7 +869,7 @@ python_domodule() {
local PYTHON_SITEDIR=${PYTHON_SITEDIR}
[[ ${PYTHON_SITEDIR} ]] || python_export PYTHON_SITEDIR
- d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot}
+ d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot//.//}
fi
(