diff --git a/python-anyjson.spec b/python-anyjson.spec index 45e9fa3..77b22ef 100644 --- a/python-anyjson.spec +++ b/python-anyjson.spec @@ -1,80 +1,66 @@ -%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 +%global sum Wraps the best available JSON implementation available Name: python-%{srcname} Version: 0.3.3 -Release: 8%{?dist} -Summary: Wraps the best available JSON implementation available +Release: 9%{?dist} +Summary: %{sum} -Group: Development/Languages License: BSD URL: http://pypi.python.org/pypi/anyjson Source0: http://pypi.python.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python3-devel %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 python2-%{srcname} +Summary: %{sum} +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +Anyjson loads whichever is the fastest JSON module installed and +provides a uniform API regardless of which JSON implementation is used. + %package -n python3-%{srcname} -Summary: Wraps the best available JSON implementation available -BuildRequires: python3-devel -BuildRequires: python3-setuptools +Summary: %{sum} +%{?python_provide:%python_provide python3-%{srcname}} %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 +%autosetup -n %{srcname}-%{version} %build -%{__python} setup.py build -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif +%py2_build +%py3_build %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 +%py2_install +%py3_install -%clean -rm -rf %{buildroot} +%files -n python2-%{srcname} +%doc CHANGELOG README +%license LICENSE +%{python2_sitelib}/%{srcname}/ +%{python2_sitelib}/%{srcname}*.egg-info -%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 +%doc CHANGELOG README +%license LICENSE %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}*.egg-info -%endif %changelog +* Sat Nov 14 2015 Fabian Affolter - 0.3.3-9 +- Cleanup + * Wed Nov 04 2015 Matej Stuchlik - 0.3.3-8 - Rebuilt for Python 3.5