3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: JSON implementation in a common interface
9 Summary(pl.UTF-8): Implementacja JSON we wspólnym interfejsie
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 Source0: http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 2ea28d6ec311aeeebaf993cb3008b27c
17 URL: https://bitbucket.org/runeh/anyjson
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-modules >= 1:2.4
22 %{?with_tests:BuildRequires: python-nose}
23 BuildRequires: python-setuptools
26 BuildRequires: python3-2to3 >= 1:3.2
27 BuildRequires: python3-modules >= 1:3.2
28 %{?with_tests:BuildRequires: python3-nose}
29 BuildRequires: python3-setuptools
31 Requires: python-modules >= 1:2.4
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Anyjson loads whichever is the fastest JSON module installed and
37 provides a uniform API regardless of which JSON implementation is
40 %description -l pl.UTF-8
41 Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
42 udostępnia jednolite API, niezależnie od używanej implementacji JSON.
44 %package -n python3-%{module}
45 Summary: JSON implementation in a common interface
46 Summary(pl.UTF-8): Implementacja JSON we wspólnym interfejsie
47 Group: Libraries/Python
48 Requires: python3-modules >= 1:3.2
50 %description -n python3-%{module}
51 Anyjson loads whichever is the fastest JSON module installed and
52 provides a uniform API regardless of which JSON implementation is
55 %description -n python3-%{module} -l pl.UTF-8
56 Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
57 udostępnia jednolite API, niezależnie od używanej implementacji JSON.
60 %setup -q -n %{module}-%{version}
64 %py_build %{?with_tests:test}
71 # tests must be run using 2to3'd sources
73 %{__python3} -m nose ../../tests
79 rm -rf $RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc CHANGELOG LICENSE README
98 %{py_sitescriptdir}/%{module}
99 %if "%{py_ver}" > "2.4"
100 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
105 %files -n python3-%{module}
106 %defattr(644,root,root,755)
107 %doc CHANGELOG LICENSE README
108 %{py3_sitescriptdir}/%{module}
109 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info