Fix python binding been noarch

This commit is contained in:
Nicolas Chauvet 2010-11-07 19:05:07 +01:00
parent 232250eb2a
commit 0bd2b8666d
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,19 @@
diff -up libproxy-0.4.6/bindings/python/CMakeLists.txt.noarch libproxy-0.4.6/bindings/python/CMakeLists.txt
--- libproxy-0.4.6/bindings/python/CMakeLists.txt.noarch 2010-09-01 22:23:34.000000000 +0200
+++ libproxy-0.4.6/bindings/python/CMakeLists.txt 2010-11-07 19:01:38.000000000 +0100
@@ -18,15 +18,11 @@ if(PYTHONINTERP_FOUND)
set(libdir "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
endif()
- if (IS_DIRECTORY "${libdir}/python${PYTHON_VERSION}/site-packages")
- set(PYTHON_SITEPKG_DIR "${libdir}/python${PYTHON_VERSION}/site-packages")
- else()
execute_process(COMMAND
${PYTHON_EXECUTABLE}
-c "import distutils.sysconfig ; print distutils.sysconfig.get_python_lib(plat_specific=0)"
OUTPUT_VARIABLE PYTHON_SITEPKG_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
- endif()
endif()
message(STATUS "Using PYTHON_SITEPKG_DIR=${PYTHON_SITEPKG_DIR}")

View File

@ -22,6 +22,7 @@ Group: System Environment/Libraries
License: LGPLv2+ License: LGPLv2+
URL: http://code.google.com/p/libproxy/ URL: http://code.google.com/p/libproxy/
Source0: http://libproxy.googlecode.com/files/libproxy-%{version}.tar.gz Source0: http://libproxy.googlecode.com/files/libproxy-%{version}.tar.gz
Patch0: libproxy-0.4.6-python_noarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{?_with_python:BuildRequires: python-devel} %{?_with_python:BuildRequires: python-devel}
@ -145,6 +146,7 @@ developing applications that use %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b.pynoarch
%build %build
%{cmake} \ %{cmake} \
@ -232,8 +234,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Tue Sep 07 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.6-1 * Sun Nov 07 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.6-1
- Update to 0.4.6 - Update to 0.4.6
- Fix python module not arch dependant
* Mon Sep 06 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.5-2 * Mon Sep 06 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.4.5-2
- Update to 0.4.5 - Update to 0.4.5