]> git.pld-linux.org Git - packages/python3-yarl.git/blob - python3-yarl.spec
rpm version for noarch subpackage
[packages/python3-yarl.git] / python3-yarl.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # API documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Yet another URL library
7 Summary(pl.UTF-8):      Yet another URL library - jeszcze jedna biblioteka do URL-i
8 Name:           python3-yarl
9 Version:        1.8.2
10 Release:        1
11 License:        Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/yarl/
14 Source0:        https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz
15 # Source0-md5:  57c82725b9f4895eecee45faf5e61a54
16 URL:            https://pypi.org/project/yarl/
17 BuildRequires:  python3-devel >= 1:3.7
18 BuildRequires:  python3-setuptools
19 %if %{with tests}
20 BuildRequires:  python3-idna >= 2.0
21 BuildRequires:  python3-multidict >= 4.0
22 BuildRequires:  python3-pytest >= 3.8.2
23 BuildRequires:  python3-pytest-cov
24 %if "%{py3_ver}" == "3.7"
25 BuildRequires:  python3-typing_extensions >= 3.7.4
26 %endif
27 %endif
28 BuildRequires:  rpm-build >= 4.6
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.752
31 %if %{with doc}
32 BuildRequires:  python3-alabaster
33 BuildRequires:  sphinx-pdg-3
34 %endif
35 Requires:       python3-modules >= 1:3.7
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Yet another URL library.
40
41 %description -l pl.UTF-8
42 YARL (Yet another URL library) to jeszcze jedna biblioteka do URL-i.
43
44 %package apidocs
45 Summary:        API documentation for Python yarl module
46 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona yarl
47 Group:          Documentation
48 BuildArch:      noarch
49
50 %description apidocs
51 API documentation for Python yarl module.
52
53 %description apidocs -l pl.UTF-8
54 Dokumentacja 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)
64 cd tests
65 PYTHONPATH=$(echo $(pwd)/../build-3/lib.*) \
66 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
67 PYTEST_PLUGINS="pytest_cov.plugin" \
68 %{__python3} -m pytest
69 cd ..
70 %endif
71
72 %if %{with doc}
73 %{__make} -C docs html \
74         SPHINXBUILD=sphinx-build-3
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %py3_install
81
82 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/yarl/_quoting_c.pyx
83
84 %clean
85 rm -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.113188 seconds and 4 git commands to generate.