]> git.pld-linux.org Git - packages/python-apipkg.git/blob - python-apipkg.spec
- rebuild with python 3.8
[packages/python-apipkg.git] / python-apipkg.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # py.test based unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Namespace control and lazy-import mechanism
8 Summary(pl.UTF-8):      Kontrola przestrzeni nazw i mechanizm leniwego importu
9 Name:           python-apipkg
10 Version:        1.5
11 Release:        2
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/apipkg/
15 Source0:        https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz
16 # Source0-md5:  6d2bc4d9358e046cc56efc677c976a5c
17 URL:            http://bitbucket.org/hpk42/apipkg
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 %{?with_tests:BuildRequires:    python-pytest}
21 BuildRequires:  python-setuptools >= 30.3.0
22 BuildRequires:  python-setuptools_scm
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.4
26 %{?with_tests:BuildRequires:    python3-pytest}
27 BuildRequires:  python3-setuptools >= 30.3.0
28 BuildRequires:  python3-setuptools_scm
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.714
32 Requires:       python-modules >= 1:2.7
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 With apipkg you can control the exported namespace of a Python package
38 and greatly reduce the number of imports for your users.
39
40 %description -l pl.UTF-8
41 Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
42 pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
43 przez użytkowników.
44
45 %package -n python3-apipkg
46 Summary:        Namespace control and lazy-import mechanism
47 Summary(pl.UTF-8):      Kontrola przestrzeni nazw i mechanizm leniwego importu
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.4
50
51 %description -n python3-apipkg
52 With apipkg you can control the exported namespace of a Python package
53 and greatly reduce the number of imports for your users.
54
55 %description -n python3-apipkg -l pl.UTF-8
56 Przy użyciu apipkg można kontrolować eksportowaną przestrzeń nazw
57 pakietu pythonowego i znacząco zredukować liczbę modułów importowaną
58 przez użytkowników.
59
60 %prep
61 %setup -q -n apipkg-%{version}
62
63 %build
64 %if %{with python2}
65 %py_build
66
67 %if %{with tests}
68 PYTHONPATH=$(pwd)/src \
69 %{__python} -m pytest
70 %endif
71 %endif
72
73 %if %{with python3}
74 %py3_build
75
76 %if %{with tests}
77 PYTHONPATH=$(pwd)/src \
78 %{__python3} -m pytest
79 %endif
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 %endif
90
91 %if %{with python3}
92 %py3_install
93 %endif
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %files
100 %defattr(644,root,root,755)
101 %doc CHANGELOG LICENSE README.rst
102 %{py_sitescriptdir}/apipkg
103 %{py_sitescriptdir}/apipkg-%{version}-py*.egg-info
104 %endif
105
106 %if %{with python3}
107 %files -n python3-apipkg
108 %defattr(644,root,root,755)
109 %doc CHANGELOG LICENSE README.rst
110 %{py3_sitescriptdir}/apipkg
111 %{py3_sitescriptdir}/apipkg-%{version}-py*.egg-info
112 %endif
This page took 0.050234 seconds and 3 git commands to generate.