]> git.pld-linux.org Git - packages/python-pep517.git/blame - python-pep517.spec
rebuild with python 3.10
[packages/python-pep517.git] / python-pep517.spec
CommitLineData
aa1205d1
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Wrappers to build Python packages using PEP 517 hooks
9Summary(pl.UTF-8): Opakowanie do budowania pakietów Pythona przy użyciu uchwytów PEP 517
10Name: python-pep517
11Version: 0.10.0
f3fdfb5d 12Release: 2
aa1205d1
JB
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/pep517/
16Source0: https://files.pythonhosted.org/packages/source/p/pep517/pep517-%{version}.tar.gz
17# Source0-md5: 59b482ecdc9f9153bd3183e8d0da99ff
18URL: https://pypi.org/project/pep517/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-importlib_metadata
24BuildRequires: python-pip
25BuildRequires: python-pytest
26BuildRequires: python-pytest-flake8
27BuildRequires: python-toml
28BuildRequires: python-zipp
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3-modules >= 1:3.6
33BuildRequires: python3-setuptools
34%if %{with tests}
35BuildRequires: python3-pip
36BuildRequires: python3-pytest
37BuildRequires: python3-pytest-flake8
38BuildRequires: python3-toml
39%if "%{py3_ver}" < "3.8"
40BuildRequires: python3-importlib_metadata
41BuildRequires: python3-zipp
42%endif
43%endif
44%endif
45BuildRequires: rpm-pythonprov
46BuildRequires: rpmbuild(macros) >= 1.714
47%if %{with doc}
48BuildRequires: python3-sphinx_rtd_theme
49BuildRequires: python3-toml
50BuildRequires: sphinx-pdg-3
51%endif
52# replace with other requires if defined in setup.py
53Requires: python-modules >= 1:2.7
54BuildArch: noarch
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57%description
58PEP 517 specifies a standard API for systems which build Python
59packages.
60
61%description -l pl.UTF-8
62PEP 517 określa standardowe API dla systemów budujących pakiety
63Pythona.
64
65%package -n python3-pep517
66Summary: Wrappers to build Python packages using PEP 517 hooks
67Summary(pl.UTF-8): Opakowanie do budowania pakietów Pythona przy użyciu uchwytów PEP 517
68Group: Libraries/Python
69Requires: python3-modules >= 1:3.6
70
71%description -n python3-pep517
72PEP 517 specifies a standard API for systems which build Python
73packages.
74
75%description -n python3-pep517 -l pl.UTF-8
76PEP 517 określa standardowe API dla systemów budujących pakiety
77Pythona.
78
79%package apidocs
80Summary: API documentation for Python pep517 module
81Summary(pl.UTF-8): Dokumentacja API modułu Pythona pep517
82Group: Documentation
83
84%description apidocs
85API documentation for Python pep517 module.
86
87%description apidocs -l pl.UTF-8
88Dokumentacja API modułu Pythona pep517.
89
90%prep
91%setup -q -n pep517-%{version}
92
93%build
94%if %{with python2}
95%py_build
96
97%if %{with tests}
98PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
99PYTEST_PLUGINS="pytest_flake8" \
39a6e93e 100%{__python} -m pytest tests -k 'not test_classic_package'
aa1205d1
JB
101%endif
102%endif
103
104%if %{with python3}
105%py3_build
106
107%if %{with tests}
108PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
109PYTEST_PLUGINS="pytest_flake8" \
7e62171e 110%{__python3} -m pytest tests -k 'not test_classic_package and not test_meta_for_this_package and not test_meta_output'
aa1205d1
JB
111%endif
112%endif
113
114%if %{with doc}
115%{__make} -C doc html \
116 SPHINXBUILD=sphinx-build-3
117%endif
118
119%install
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%py_install
124
125# _in_process.py is executed by filename
126%py_postclean -x _in_process.py
127%endif
128
129%if %{with python3}
130%py3_install
131%endif
132
133%clean
134rm -rf $RPM_BUILD_ROOT
135
136%if %{with python2}
137%files
138%defattr(644,root,root,755)
139%doc LICENSE README.rst
140%{py_sitescriptdir}/pep517
141%{py_sitescriptdir}/pep517-%{version}-py*.egg-info
142%endif
143
144%if %{with python3}
145%files -n python3-pep517
146%defattr(644,root,root,755)
147# copy %doc from python2 package here
148%{py3_sitescriptdir}/pep517
149%{py3_sitescriptdir}/pep517-%{version}-py*.egg-info
150%endif
151
152%if %{with doc}
153%files apidocs
154%defattr(644,root,root,755)
155%doc doc/_build/html/{_static,*.html,*.js}
156%endif
This page took 0.129103 seconds and 4 git commands to generate.