summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorModestas Vainius <modax@debian.org>2011-06-30 23:41:43 +0300
committerModestas Vainius <modax@debian.org>2011-06-30 23:41:43 +0300
commite6beae680a77cf0cbdfad8229674d623f955b0e6 (patch)
treed6896e0c03825107976c56f29ee21c75885a1591
parenteb60037763086794db4ee01624ea858fa19ae9d9 (diff)
downloadkde4libs-e6beae680a77cf0cbdfad8229674d623f955b0e6.tar.gz
Make --layout=deb affect PYTHON_SITE_PACKAGES_INSTALL_DIR as well.
Fix findpythonlibrary_layout_deb_on_debian.diff patch to set PYTHON_SITE_PACKAGES_INSTALL_DIR properly as well.
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/findpythonlibrary_layout_deb_on_debian.diff19
2 files changed, 18 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index c7655d6..7328fd6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
kde4libs (4:4.6.4-2) UNRELEASED; urgency=low
+ * Fix findpythonlibrary_layout_deb_on_debian.diff patch to set
+ PYTHON_SITE_PACKAGES_INSTALL_DIR properly as well.
-- Modestas Vainius <modax@debian.org> Thu, 30 Jun 2011 23:39:39 +0300
diff --git a/debian/patches/findpythonlibrary_layout_deb_on_debian.diff b/debian/patches/findpythonlibrary_layout_deb_on_debian.diff
index fb4f88e..5ae60d9 100644
--- a/debian/patches/findpythonlibrary_layout_deb_on_debian.diff
+++ b/debian/patches/findpythonlibrary_layout_deb_on_debian.diff
@@ -1,12 +1,15 @@
From: Modestas Vainius <modax@debian.org>
Subject: FindPythonLibrary: pass --layout=deb to distutils if build type is Debian
Forwarded: not-needed
-Origin:vendor
-Last-Update: 2011-06-06
+Origin: vendor
+Last-Update: 2011-06-30
Python stuff should be installed to /usr/lib/python<version>/dist-packages/
rather than /usr/lib/python<version>/site-packages/ when building debian
-packages (i.e. CMAKE_BUILD_TYPE is Debian).
+packages (i.e. CMAKE_BUILD_TYPE is Debian).
+
+This affects both PYTHON_SITE_PACKAGES_DIR and PYTHON_SITE_PACKAGES_INSTALL_DIR
+variables.
--- a/cmake/modules/FindPythonLibrary.cmake
+++ b/cmake/modules/FindPythonLibrary.cmake
@@ -22,3 +25,13 @@ packages (i.e. CMAKE_BUILD_TYPE is Debian).
if(python_config)
string(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config})
string(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config})
+@@ -60,7 +63,8 @@ else(EXISTS PYTHON_LIBRARY)
+ set(PYTHON_SITE_PACKAGES_DIR "${_TMP_PYTHON_SITE_PACKAGES_DIR}" CACHE PATH "The python site packages dir" FORCE)
+
+ # This one is intended to be used and changed by the user for installing own modules:
+- set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_SHORT_VERSION}/site-packages CACHE PATH "The directory where python modules will be installed to.")
++ get_filename_component(_python_site_packages_dir_name "${_TMP_PYTHON_SITE_PACKAGES_DIR}" NAME)
++ set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_SHORT_VERSION}/${_python_site_packages_dir_name} CACHE PATH "The directory where python modules will be installed to.")
+
+ string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION})
+ set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT})