]> git.pld-linux.org Git - packages/python3-yarl.git/blame - python3-yarl.spec
rpm version for noarch subpackage
[packages/python3-yarl.git] / python3-yarl.spec
CommitLineData
f737c3b4
JB
1#
2# Conditional build:
3%bcond_without doc # API documentation
4%bcond_without tests # unit tests
5
6Summary: Yet another URL library
7Summary(pl.UTF-8): Yet another URL library - jeszcze jedna biblioteka do URL-i
8Name: python3-yarl
32f665dd 9Version: 1.8.2
d338adfe 10Release: 1
f737c3b4
JB
11License: Apache v2.0
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/yarl/
14Source0: https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz
32f665dd 15# Source0-md5: 57c82725b9f4895eecee45faf5e61a54
f737c3b4 16URL: https://pypi.org/project/yarl/
d338adfe 17BuildRequires: python3-devel >= 1:3.7
f737c3b4
JB
18BuildRequires: python3-setuptools
19%if %{with tests}
20BuildRequires: python3-idna >= 2.0
21BuildRequires: python3-multidict >= 4.0
22BuildRequires: python3-pytest >= 3.8.2
23BuildRequires: python3-pytest-cov
d338adfe 24%if "%{py3_ver}" == "3.7"
f737c3b4
JB
25BuildRequires: python3-typing_extensions >= 3.7.4
26%endif
27%endif
da3054eb 28BuildRequires: rpm-build >= 4.6
f737c3b4
JB
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.752
31%if %{with doc}
32BuildRequires: python3-alabaster
33BuildRequires: sphinx-pdg-3
34%endif
d338adfe 35Requires: python3-modules >= 1:3.7
f737c3b4
JB
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39Yet another URL library.
40
41%description -l pl.UTF-8
42YARL (Yet another URL library) to jeszcze jedna biblioteka do URL-i.
43
44%package apidocs
45Summary: API documentation for Python yarl module
46Summary(pl.UTF-8): Dokumentacja API modułu Pythona yarl
47Group: Documentation
8462ccb5 48BuildArch: noarch
f737c3b4
JB
49
50%description apidocs
51API documentation for Python yarl module.
52
53%description apidocs -l pl.UTF-8
54Dokumentacja API modułu Pythona yarl.
55
56%prep
57%setup -q -n yarl-%{version}
58
59%build
60%py3_build
61
62%if %{with tests}
63# run from dir not containing yarl source dir without compiled yarl._quoting_c module)
64cd tests
65PYTHONPATH=$(echo $(pwd)/../build-3/lib.*) \
66PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
67PYTEST_PLUGINS="pytest_cov.plugin" \
68%{__python3} -m pytest
69cd ..
70%endif
71
72%if %{with doc}
73%{__make} -C docs html \
74 SPHINXBUILD=sphinx-build-3
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%py3_install
81
d338adfe 82%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/yarl/_quoting_c.pyx
f737c3b4
JB
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%files
88%defattr(644,root,root,755)
89%doc CHANGES.rst README.rst
90%dir %{py3_sitedir}/yarl
91%attr(755,root,root) %{py3_sitedir}/yarl/_quoting_c.cpython-*.so
92%{py3_sitedir}/yarl/*.py
93%{py3_sitedir}/yarl/*.pyi
94%{py3_sitedir}/yarl/py.typed
95%{py3_sitedir}/yarl/__pycache__
96%{py3_sitedir}/yarl-%{version}-py*.egg-info
97
98%if %{with doc}
99%files apidocs
100%defattr(644,root,root,755)
101%doc docs/_build/html/{_static,*.html,*.js}
102%endif
This page took 0.355881 seconds and 4 git commands to generate.