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