]> git.pld-linux.org Git - SPECS.git/blob - python-anyjson.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-anyjson.spec
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
7 %define         module  anyjson
8 Summary:        JSON implementation in a common interface
9 Summary(pl.UTF-8):      Implementacja JSON we wspólnym interfejsie
10 Name:           python-%{module}
11 Version:        0.3.3
12 Release:        7
13 License:        BSD
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
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.4
22 %{?with_tests:BuildRequires: python-nose}
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-2to3 >= 1:3.2
27 BuildRequires:  python3-modules >= 1:3.2
28 %{?with_tests:BuildRequires: python3-nose}
29 BuildRequires:  python3-setuptools
30 %endif
31 Requires:       python-modules >= 1:2.4
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Anyjson loads whichever is the fastest JSON module installed and
37 provides a uniform API regardless of which JSON implementation is
38 used.
39
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.
43
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
49
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
53 used.
54
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.
58
59 %prep
60 %setup -q -n %{module}-%{version}
61
62 %build
63 %if %{with python2}
64 %py_build %{?with_tests:test}
65 %endif
66
67 %if %{with python3}
68 %py3_build
69
70 %if %{with tests}
71 # tests must be run using 2to3'd sources
72 cd build-3/lib
73 %{__python3} -m nose ../../tests
74 cd ../..
75 %endif
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %py_install
83
84 %py_postclean
85 %endif
86
87 %if %{with python3}
88 %py3_install
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
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
101 %endif
102 %endif
103
104 %if %{with python3}
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
110 %endif
This page took 0.167817 seconds and 3 git commands to generate.