summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorGonéri Le Bouder <goneri@lebouder.net>2019-11-05 10:45:05 -0500
committerMatt Clay <matt@mystile.com>2019-11-12 10:55:24 -0800
commit6d829b0f6c03eef0652558dc878dbd0cc3efe008 (patch)
tree9bb2912c6d596d0ce66390669281e82520725c1e /packaging
parent64665ffcc95d72028278fcf4c5f29b645dbeb764 (diff)
downloadansible-6d829b0f6c03eef0652558dc878dbd0cc3efe008.tar.gz
[stable-2.9] debian: install lib in dist-packages (#64412)
On Ubuntu Precise and Trusty, the build was failing because the Ansible libs were installed in /usr/lib/python2.7/site-packages. According to the Debian Policy (2.5), they should actually be install in /usr/lib/python2.7/dist-packages This is also CDBS default behaviour since 0.4.131. See: https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html Closes: #64160
Diffstat (limited to 'packaging')
-rw-r--r--packaging/debian/ansible.dirs2
-rwxr-xr-xpackaging/debian/rules4
2 files changed, 4 insertions, 2 deletions
diff --git a/packaging/debian/ansible.dirs b/packaging/debian/ansible.dirs
index 91122c6cab..0652021412 100644
--- a/packaging/debian/ansible.dirs
+++ b/packaging/debian/ansible.dirs
@@ -1,4 +1,4 @@
etc/ansible
etc/ansible/roles
-usr/lib/python2.7/site-packages
+usr/lib/python2.7/dist-packages/ansible
usr/share/ansible
diff --git a/packaging/debian/rules b/packaging/debian/rules
index d00ee73625..e676325cd9 100755
--- a/packaging/debian/rules
+++ b/packaging/debian/rules
@@ -2,14 +2,16 @@
# -- makefile --
DEB_PYTHON2_MODULE_PACKAGES=ansible ansible_test
+#DEB_PYTHON_INSTALL_ARGS_ALL="--install-purelib=/usr/lib/python2.7/site-packages/"
+DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/@PYTHONBINARY@/dist-packages/
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
+# dist-packages for the modern distro, site-packages for the older (e.g: Ubuntu 14.04)
ifeq ($(shell lsb_release -cs), precise)
export ANSIBLE_CRYPTO_BACKEND = pycrypto
endif
ifeq ($(shell lsb_release -cs), trusty)
export ANSIBLE_CRYPTO_BACKEND = pycrypto
endif
-