Update to 3.1.0 in Rawhide.

- Build the python3 subpackage
- Update to new-style filtering of provides
epel8
Toshio Kuratomi 12 years ago
parent 44fb0d8e92
commit 1886d01411

@ -2,16 +2,24 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif %endif
# Python3 support is 3.3+ (which was introduced in Fedora 18)
%if 0%{?fedora} && 0%{?fedora} >= 18
%global with_python3 1
%endif
# we don't want to provide private python extension libs
%global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch}).*\\.so$
Name: python-simplejson Name: python-simplejson
Version: 2.6.0 Version: 3.1.0
Release: 1%{?dist} Release: 1%{?dist}
Summary: Simple, fast, extensible JSON encoder/decoder for Python Summary: Simple, fast, extensible JSON encoder/decoder for Python
Group: System Environment/Libraries Group: System Environment/Libraries
# The main code is licensed MIT. # The main code is licensed MIT.
# The docs include jquery which is licensed MIT or GPLv2 # The docs include jquery which is licensed MIT or GPLv2
License: MIT and (MIT or GPLv2) License: (MIT or AFL) and (MIT or GPLv2)
URL: http://undefined.org/python/#simplejson URL: http://undefined.org/python/#simplejson
Source0: http://pypi.python.org/packages/source/s/simplejson/simplejson-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/s/simplejson/simplejson-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -20,12 +28,11 @@ BuildRequires: python2-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: python-nose BuildRequires: python-nose
BuildRequires: python-sphinx BuildRequires: python-sphinx
%if 0%{?with_python3}
# we don't want to provide private python extension libs BuildRequires: python3-devel
%{?filter_setup: BuildRequires: python3-setuptools
%filter_provides_in %{python_sitearch}/.*\.so$ BuildRequires: python3-nose
%filter_setup %endif # with_python3
}
%description %description
@ -46,22 +53,71 @@ included with Python 2.6 and Python 3.0, but maintains backwards compatibility
with Python 2.5. It gets updated more regularly than the json module in the with Python 2.5. It gets updated more regularly than the json module in the
python stdlib. python stdlib.
%if 0%{?with_python3}
%package -n python3-simplejson
Summary: Simple, fast, extensible JSON encoder/decoder for Python3
Group: System Environment/Libraries
%description -n python3-simplejson
simplejson is a simple, fast, complete, correct and extensible JSON
<http://json.org> encoder and decoder for Python 2.5+ and python3.3+ It is pure
Python code with no dependencies, but includes an optional C extension for a
serious speed boost.
The encoder may be subclassed to provide serialization in any kind of
situation, without any special support by the objects to be serialized
(somewhat like pickle).
The decoder can handle incoming JSON strings of any specified encoding (UTF-8
by default).
simplejson is the externally maintained development version of the json library
included with Python 2.6 and Python 3.0, but maintains backwards compatibility
with Python 2.5. It gets updated more regularly than the json module in the
python stdlib.
%endif # with_python3
%prep %prep
%setup -q -n simplejson-%{version} %setup -q -n simplejson-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build %build
%{__python} setup.py build %{__python} setup.py build
./scripts/make_docs.py ./scripts/make_docs.py
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root=%{buildroot} %{__python} setup.py install --skip-build --root=%{buildroot}
rm docs/.buildinfo
rm docs/.nojekyll
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root=%{buildroot}
popd
%endif # with_python3
%check %check
nosetests -q nosetests -q
%if 0%{?with_python3}
pushd %{py3dir}
nosetests-%{python3_version} -q
popd
%endif # with_python3
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -71,8 +127,19 @@ rm -rf %{buildroot}
%doc docs LICENSE.txt %doc docs LICENSE.txt
%{python_sitearch}/* %{python_sitearch}/*
%if 0%{?with_python3}
%files -n python3-simplejson
%defattr(-,root,root,-)
%doc LICENSE.txt
%{python3_sitearch}/*
%endif # python3
%changelog %changelog
* Mon Feb 25 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.0-1
- Update to 3.1.0 in Rawhide.
- Build the python3 subpackage
- Update to new-style filtering of provides
* Fri Jun 29 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 2.6.0-1 * Fri Jun 29 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 2.6.0-1
- Update to 2.6.0 which changes some messages thrown by exceptions to match - Update to 2.6.0 which changes some messages thrown by exceptions to match
with json module in python3.3 stdlib. Probably safe for older releases but with json module in python3.3 stdlib. Probably safe for older releases but

Loading…
Cancel
Save