[python-anyjson] * Tue Jan 31 2012 Fabian Affolter <mail at fabian-affolter.ch> - 0.3.1-3 - Minor py3 fixes

Fabian Affolter fab at fedoraproject.org
Tue Jan 31 22:07:40 UTC 2012


commit 2cba5086297ad80d6b5349b0ffe73518b6c007d5
Author: Fabian Affolter <mail at fabian-affolter.ch>
Date:   Tue Jan 31 23:07:30 2012 +0100

    * Tue Jan 31 2012 Fabian Affolter <mail at fabian-affolter.ch> - 0.3.1-3
    - Minor py3 fixes
    
    * Sun Jan 29 2012 Haïkel Guémar <hguemar at fedoraproject.org> - 0.3.1-2
    - add python3 variant

 python-anyjson.spec |   53 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 41 insertions(+), 12 deletions(-)
---
diff --git a/python-anyjson.spec b/python-anyjson.spec
index 3c7ee93..5f2834b 100644
--- a/python-anyjson.spec
+++ b/python-anyjson.spec
@@ -1,12 +1,14 @@
-%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
 %endif
 
 %global srcname anyjson
 
 Name:           python-%{srcname}
 Version:        0.3.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Wraps the best available JSON implementation available
 
 Group:          Development/Languages
@@ -16,42 +18,69 @@ Source0:        http://pypi.python.org/packages/source/a/%{srcname}/%{srcname}-%
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
-
+BuildRequires:  python2-devel
+BuildRequires:  python2-setuptools
 
 %description
 Anyjson loads whichever is the fastest JSON module installed and
 provides a uniform API regardless of which JSON implementation is used.
 
+%if 0%{?with_python3}
+%package -n python3-%{srcname}
+Summary:        Wraps the best available JSON implementation available
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+
+%description -n python3-%{srcname}
+Anyjson loads whichever is the fastest JSON module installed and
+provides a uniform API regardless of which JSON implementation is used.
+%endif
 
 %prep
 %setup -q -n %{srcname}-%{version}
-
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif
 
 %build
 %{__python} setup.py build
-
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
 
 %install
 rm -rf %{buildroot}
 %{__python} setup.py install --skip-build --root %{buildroot}
-
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
  
 %clean
 rm -rf %{buildroot}
 
-
 %files
 %defattr(-,root,root,-)
 %doc CHANGELOG LICENSE README
 %{python_sitelib}/%{srcname}/
 %{python_sitelib}/%{srcname}*.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-%{srcname}
+%doc CHANGELOG LICENSE README
+%{python3_sitelib}/%{srcname}/
+%{python3_sitelib}/%{srcname}*.egg-info
+%endif
 
 %changelog
-* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.1-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+* Tue Jan 31 2012 Fabian Affolter <mail at fabian-affolter.ch> - 0.3.1-3
+- Minor py3 fixes
+
+* Sun Jan 29 2012 Haïkel Guémar <hguemar at fedoraproject.org> - 0.3.1-2
+- add python3 variant
 
 * Sun Apr 03 2011 Fabian Affolter <fabian at bernewireless.net> - 0.3.1-1
 - Updated to new upstream version 0.3.1


More information about the scm-commits mailing list