From 0d450c0193fd52c1fc9a4d007eef16ececa196e757eb2ffe74214c46915907d7 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 26 Apr 2012 14:56:21 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyflakes?expand=0&rev=5 --- python3-pyflakes.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3-pyflakes.spec b/python3-pyflakes.spec index 892c092..6e4d0b0 100644 --- a/python3-pyflakes.spec +++ b/python3-pyflakes.spec @@ -26,6 +26,7 @@ License: MIT Group: Development/Languages/Python Source: pyflakes-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3-2to3 BuildRequires: python3-devel Requires: python3 >= %{py3_ver} %if 0%{?suse_version} > 1110 From 1a4790b611989eefd568e77753fff73a5f3ee5aba094fef6c304a9e67098866e Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 30 Apr 2012 11:51:18 +0000 Subject: [PATCH 2/2] Accepting request 116028 from devel:languages:python3 Fix building python 3 package on openSUSE 11.4 x86_64 (forwarded request 116027 from TheBlackCat) OBS-URL: https://build.opensuse.org/request/show/116028 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyflakes?expand=0&rev=6 --- python-pyflakes.changes | 5 +++++ python3-pyflakes.changes | 5 +++++ python3-pyflakes.spec | 20 ++++++++++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/python-pyflakes.changes b/python-pyflakes.changes index c8f0e39..d32858a 100644 --- a/python-pyflakes.changes +++ b/python-pyflakes.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 27 14:07:19 UTC 2012 - toddrme2178@gmail.com + +- Fix building python 3 package on openSUSE 11.4 x86_64 + ------------------------------------------------------------------- Thu Apr 26 09:07:39 UTC 2012 - toddrme2178@gmail.com diff --git a/python3-pyflakes.changes b/python3-pyflakes.changes index 242a8f4..91a4078 100644 --- a/python3-pyflakes.changes +++ b/python3-pyflakes.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 27 14:07:19 UTC 2012 - toddrme2178@gmail.com + +- Fix building python 3 package on openSUSE 11.4 x86_64 + ------------------------------------------------------------------- Thu Apr 26 09:07:39 UTC 2012 - toddrme2178@gmail.com diff --git a/python3-pyflakes.spec b/python3-pyflakes.spec index 6e4d0b0..7eed2e6 100644 --- a/python3-pyflakes.spec +++ b/python3-pyflakes.spec @@ -14,8 +14,6 @@ # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: python3-pyflakes Version: 0.5.0 @@ -26,12 +24,19 @@ License: MIT Group: Development/Languages/Python Source: pyflakes-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3 BuildRequires: python3-2to3 BuildRequires: python3-devel -Requires: python3 >= %{py3_ver} -%if 0%{?suse_version} > 1110 -BuildArch: noarch +%if 0%{?suse_version} <= 1140 +%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)} +%ifarch x86_64 +# to allow ownership of noarch python directories +BuildRequires: python3-32bit %endif +%endif +BuildArch: noarch +Requires: python3 >= %{py3_ver} %description Pyflakes is program to analyze Python programs and detect various errors. It @@ -50,7 +55,10 @@ mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-python%{py3_v %files %defattr(-,root,root,-) -%{python3_sitelib}/* %{_bindir}/pyflakes-python%{py3_ver} +%{python3_sitelib}/* +%if 0%{?suse_version} <= 1140 +%dir %{python3_sitelib} +%endif %changelog