e116515
%global srcname anyjson
4b5aefc
%global sum Wraps the best available JSON implementation
e116515
e116515
Name:           python-%{srcname}
Matthias Runge 73db7b7
Version:        0.3.3
64d8ac7
Release:        17%{?dist}
Fabian Affolter 22156d1
Summary:        %{sum}
e116515
e116515
License:        BSD
e116515
URL:            http://pypi.python.org/pypi/anyjson
e116515
Source0:        http://pypi.python.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz
606d92e
# Fix Python 3 compatibility
606d92e
Patch0:         anyjson-python3.patch
4b5aefc
# Include ujson, raise priority of cjson and drop the 'deprecation'
4b5aefc
# warning (it's about as alive as half the others), drop jsonlib,
4b5aefc
# jsonlib2 and django.utils.simplejson (which all appear to be dead
4b5aefc
# as doornails)
4b5aefc
%if 0%{fedora} > 25
4b5aefc
Patch1:         python-anyjson-update-order-ujson.patch
4b5aefc
%else
4b5aefc
# Just the same, but don't include ujson, as its behaviour pre-2.0
4b5aefc
# was very weird and unexpected, it would 'serialize' all sorts of
4b5aefc
# unserializable things
4b5aefc
Patch1:         python-anyjson-update-order.patch
4b5aefc
%endif
e116515
BuildArch:      noarch
e116515
2cba508
BuildRequires:  python2-devel
606d92e
BuildRequires:  python2-six
606d92e
BuildRequires:  python2-nose
Fabian Affolter 22156d1
BuildRequires:  python3-devel
Fabian Affolter 2eb08a4
BuildRequires:  python3-setuptools
606d92e
BuildRequires:  python3-six
606d92e
BuildRequires:  python3-nose
5884137
606d92e
# The tests test whichever parsers they can find, so install as many
5bf35e1
# as we can for the tests to use.
5884137
# python2-simplejson provide is missing on f24
64d8ac7
BuildRequires:  python2-simplejson
606d92e
BuildRequires:  python3-simplejson
606d92e
# No Python 3 build of this
64d8ac7
BuildRequires:  python2-cjson
e116515
4b5aefc
%if 0%{fedora} > 25
4b5aefc
BuildRequires:  python2-ujson
4b5aefc
BuildRequires:  python3-ujson
4b5aefc
%endif
4b5aefc
e116515
%description
e116515
Anyjson loads whichever is the fastest JSON module installed and
e116515
provides a uniform API regardless of which JSON implementation is used.
e116515
Fabian Affolter 22156d1
%package -n python2-%{srcname}
Fabian Affolter 22156d1
Summary:        %{sum}
Fabian Affolter 22156d1
%{?python_provide:%python_provide python2-%{srcname}}
606d92e
Requires:       python2-six
Fabian Affolter 22156d1
Fabian Affolter 22156d1
%description -n python2-%{srcname}
Fabian Affolter 22156d1
Anyjson loads whichever is the fastest JSON module installed and
Fabian Affolter 22156d1
provides a uniform API regardless of which JSON implementation is used.
Fabian Affolter 22156d1
2cba508
%package -n python3-%{srcname}
Fabian Affolter 22156d1
Summary:        %{sum}
Fabian Affolter 22156d1
%{?python_provide:%python_provide python3-%{srcname}}
606d92e
Requires:       python3-six
2cba508
2cba508
%description -n python3-%{srcname}
2cba508
Anyjson loads whichever is the fastest JSON module installed and
2cba508
provides a uniform API regardless of which JSON implementation is used.
e116515
e116515
%prep
606d92e
%autosetup -n %{srcname}-%{version} -p1
e116515
e116515
%build
Fabian Affolter 22156d1
%py2_build
Fabian Affolter 22156d1
%py3_build
e116515
e116515
%install
Fabian Affolter 22156d1
%py2_install
Fabian Affolter 22156d1
%py3_install
606d92e
606d92e
%check
606d92e
%{__python2} setup.py test
606d92e
%{__python3} setup.py test
e116515
 
Fabian Affolter 22156d1
%files -n python2-%{srcname}
Fabian Affolter 22156d1
%doc CHANGELOG README
Fabian Affolter 22156d1
%license LICENSE
Fabian Affolter 22156d1
%{python2_sitelib}/%{srcname}/
Fabian Affolter 22156d1
%{python2_sitelib}/%{srcname}*.egg-info
e116515
2cba508
%files -n python3-%{srcname}
Fabian Affolter 22156d1
%doc CHANGELOG README
Fabian Affolter 22156d1
%license LICENSE
2cba508
%{python3_sitelib}/%{srcname}/
2cba508
%{python3_sitelib}/%{srcname}*.egg-info
e116515
e116515
%changelog
64d8ac7
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.3-17
64d8ac7
- Update Python 2 dependency declarations to new packaging standards
64d8ac7
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
64d8ac7
b66d56f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-16
b66d56f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b66d56f
4ff915a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-15
4ff915a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4ff915a
4b5aefc
* Fri Feb 10 2017 Adam Williamson <awilliam@redhat.com> - 0.3.3-14
4b5aefc
- Add ujson support (for Fedora > 25, with ujson 2.0+)
4b5aefc
606d92e
* Sat Dec 24 2016 Adam Williamson <awilliam@redhat.com> - 0.3.3-13
606d92e
- update the Python 3 compatibility patch (fixes build)
606d92e
- enable tests
606d92e
- add some more BuildRequires to extend test coverage
606d92e
606d92e
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com>
f8a8eea
- Rebuild for Python 3.6
f8a8eea
6ca7952
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-12
6ca7952
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
6ca7952
Fabian Affolter 2eb08a4
* Sat May 14 2016 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.3-11
Fabian Affolter 2eb08a4
- Fix FTBFS (rhbz#1307894)
Fabian Affolter 2eb08a4
dc48488
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-10
dc48488
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
dc48488
Fabian Affolter 22156d1
* Sat Nov 14 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.3-9
Fabian Affolter 22156d1
- Cleanup
Fabian Affolter 22156d1
Matej Stuchlik f5f0fda
* Wed Nov 04 2015 Matej Stuchlik <mstuchli@redhat.com> - 0.3.3-8
Matej Stuchlik f5f0fda
- Rebuilt for Python 3.5
Matej Stuchlik f5f0fda
9955df3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-7
9955df3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9955df3
43101c3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-6
43101c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
43101c3
ea05e55
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.3-5
ea05e55
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
ea05e55
2a1e829
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-4
2a1e829
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2a1e829
9caae27
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-3
9caae27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9caae27
d213a9d
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.3.3-2
d213a9d
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
d213a9d
Matthias Runge 73db7b7
* Fri Aug 03 2012 Matthias Runge <mrunge@matthias-runge.de> - 0.3.3-1
Matthias Runge 73db7b7
- update to 0.3.3
Matthias Runge 73db7b7
5fcdbef
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-4
5fcdbef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5fcdbef
2cba508
* Tue Jan 31 2012 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.1-3
2cba508
- Minor py3 fixes
2cba508
2cba508
* Sun Jan 29 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.3.1-2
2cba508
- add python3 variant
e487c27
Fabian Affolter e1096df
* Sun Apr 03 2011 Fabian Affolter <fabian@bernewireless.net> - 0.3.1-1
Fabian Affolter e1096df
- Updated to new upstream version 0.3.1
Fabian Affolter e1096df
06f6baa
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
06f6baa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
06f6baa
Fabian Affolter decf70a
* Thu Jan 27 2011 Fabian Affolter <fabian@bernewireless.net> - 0.3-1
Fabian Affolter decf70a
- Updated to new upstream version 0.3
Fabian Affolter decf70a
f33b51f
* Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 0.2.4-2
f33b51f
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
f33b51f
e116515
* Sat Jul 03 2010 Fabian Affolter <fabian@bernewireless.net> - 0.2.4-1
e116515
- Initial package