]> git.pld-linux.org Git - packages/python-anyjson.git/blame - python-anyjson.spec
rebuild with python 3.10
[packages/python-anyjson.git] / python-anyjson.spec
CommitLineData
ac9a9fad
JK
1#
2# Conditional build:
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
6
a8014b1f 7%define module anyjson
53cca5d8 8Summary: JSON implementation in a common interface
f107bc6f 9Summary(pl.UTF-8): Implementacja JSON we wspólnym interfejsie
a8014b1f 10Name: python-%{module}
eeb46b3e 11Version: 0.3.3
8e3dd61d 12Release: 8
53cca5d8 13License: BSD
a8014b1f 14Group: Development/Languages/Python
15Source0: http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
eeb46b3e 16# Source0-md5: 2ea28d6ec311aeeebaf993cb3008b27c
53cca5d8 17URL: https://bitbucket.org/runeh/anyjson
a8014b1f 18BuildRequires: rpm-pythonprov
f107bc6f 19BuildRequires: rpmbuild(macros) >= 1.714
ac9a9fad 20%if %{with python2}
f107bc6f 21BuildRequires: python-modules >= 1:2.4
ac9a9fad
JK
22%{?with_tests:BuildRequires: python-nose}
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
f107bc6f
JB
26BuildRequires: python3-2to3 >= 1:3.2
27BuildRequires: python3-modules >= 1:3.2
28%{?with_tests:BuildRequires: python3-nose}
ac9a9fad
JK
29BuildRequires: python3-setuptools
30%endif
f107bc6f 31Requires: python-modules >= 1:2.4
a8014b1f 32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
53cca5d8 36Anyjson loads whichever is the fastest JSON module installed and
37provides a uniform API regardless of which JSON implementation is
38used.
a8014b1f 39
f107bc6f
JB
40%description -l pl.UTF-8
41Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
42udostępnia jednolite API, niezależnie od używanej implementacji JSON.
43
ac9a9fad
JK
44%package -n python3-%{module}
45Summary: JSON implementation in a common interface
f107bc6f 46Summary(pl.UTF-8): Implementacja JSON we wspólnym interfejsie
ac9a9fad 47Group: Libraries/Python
f107bc6f 48Requires: python3-modules >= 1:3.2
ac9a9fad
JK
49
50%description -n python3-%{module}
51Anyjson loads whichever is the fastest JSON module installed and
52provides a uniform API regardless of which JSON implementation is
53used.
54
f107bc6f
JB
55%description -n python3-%{module} -l pl.UTF-8
56Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
57udostępnia jednolite API, niezależnie od używanej implementacji JSON.
58
a8014b1f 59%prep
60%setup -q -n %{module}-%{version}
61
62%build
ac9a9fad 63%if %{with python2}
d4c0b038 64%py_build %{?with_tests:test}
ac9a9fad
JK
65%endif
66
67%if %{with python3}
f107bc6f 68%py3_build
ac9a9fad 69
f107bc6f
JB
70%if %{with tests}
71# tests must be run using 2to3'd sources
72cd build-3/lib
73%{__python3} -m nose ../../tests
74cd ../..
75%endif
76%endif
a8014b1f 77
78%install
79rm -rf $RPM_BUILD_ROOT
ac9a9fad
JK
80
81%if %{with python2}
d4c0b038 82%py_install
a8014b1f 83
84%py_postclean
ac9a9fad
JK
85%endif
86
87%if %{with python3}
d4c0b038 88%py3_install
ac9a9fad 89%endif
a8014b1f 90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
f107bc6f 94%if %{with python2}
a8014b1f 95%files
96%defattr(644,root,root,755)
f107bc6f 97%doc CHANGELOG LICENSE README
a8014b1f 98%{py_sitescriptdir}/%{module}
99%if "%{py_ver}" > "2.4"
f107bc6f
JB
100%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
101%endif
a8014b1f 102%endif
ac9a9fad 103
f107bc6f 104%if %{with python3}
ac9a9fad
JK
105%files -n python3-%{module}
106%defattr(644,root,root,755)
f107bc6f 107%doc CHANGELOG LICENSE README
ac9a9fad 108%{py3_sitescriptdir}/%{module}
f107bc6f 109%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
ac9a9fad 110%endif
This page took 0.207254 seconds and 4 git commands to generate.