From ef1f4c723c61950c9fcbc9cc4139e9024593cced4cd6a2067d14cf154c1a58c6 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 27 Feb 2012 08:35:54 +0000 Subject: [PATCH] - Package copying - Platform-dependent Python packages belong into %python_sitearch, only noarch packages may go nito %python_sitelib. Seems to be an upstream issue OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distorm3?expand=0&rev=2 --- python-distorm3.changes | 8 ++++++++ python-distorm3.spec | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/python-distorm3.changes b/python-distorm3.changes index cdc4529..4c46ec3 100644 --- a/python-distorm3.changes +++ b/python-distorm3.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 27 08:34:56 UTC 2012 - saschpe@suse.de + +- Package copying +- Platform-dependent Python packages belong into %python_sitearch, + only noarch packages may go nito %python_sitelib. Seems to be an + upstream issue + ------------------------------------------------------------------- Mon Feb 6 23:20:54 UTC 2012 - Greg.Freemyer@gmail.com diff --git a/python-distorm3.spec b/python-distorm3.spec index 0997617..52b9bbf 100644 --- a/python-distorm3.spec +++ b/python-distorm3.spec @@ -1,7 +1,7 @@ # # spec file for package python-distorm3 # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,13 +24,12 @@ Url: http://code.google.com/p/distorm/ Group: Development/Libraries/Python Source: distorm3-1.0.zip BuildRequires: pkg-config -BuildRequires: python-devel +BuildRequires: python-devel > 2.5 BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build - %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -# need to set python_sitelib here I think if you want this to build for SLE +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else %py_requires %endif @@ -45,10 +44,13 @@ No more parsing strings! - diStorm3 is really a decomposer, which means it takes CFLAGS="%{optflags}" python setup.py build %install -python setup.py install --root=%{buildroot} --prefix=%{_prefix} --record-rpm=INSTALLED_FILES +python setup.py install --root=%{buildroot} --prefix=%{_prefix} +install -d %{buildroot}%{python_sitearch} +mv %{buildroot}%{python_sitelib}/* %{buildroot}%{python_sitearch} -%files -f INSTALLED_FILES +%files %defattr(-,root,root) -%{python_sitelib}/distorm3/libdistorm3.so +%doc COPYING +%{python_sitearch}/* %changelog