]> git.pld-linux.org Git - packages/python3-yarl.git/blob - python3-yarl.spec
- new
[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.6.3
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:  3b6f2da3db8c645a9440375fd6a414eb
16 URL:            https://pypi.org/project/yarl/
17 BuildRequires:  python3-devel >= 1:3.6
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.8"
25 BuildRequires:  python3-typing_extensions >= 3.7.4
26 %endif
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.752
30 %if %{with doc}
31 BuildRequires:  python3-alabaster
32 BuildRequires:  sphinx-pdg-3
33 %endif
34 Requires:       python3-modules >= 1:3.6
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Yet another URL library.
39
40 %description -l pl.UTF-8
41 YARL (Yet another URL library) to jeszcze jedna biblioteka do URL-i.
42
43 %package apidocs
44 Summary:        API documentation for Python yarl module
45 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona yarl
46 Group:          Documentation
47 %{?noarchpackage}
48
49 %description apidocs
50 API documentation for Python yarl module.
51
52 %description apidocs -l pl.UTF-8
53 Dokumentacja 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)
63 cd tests
64 PYTHONPATH=$(echo $(pwd)/../build-3/lib.*) \
65 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
66 PYTEST_PLUGINS="pytest_cov.plugin" \
67 %{__python3} -m pytest
68 cd ..
69 %endif
70
71 %if %{with doc}
72 %{__make} -C docs html \
73         SPHINXBUILD=sphinx-build-3
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %py3_install
80
81 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/yarl/_quoting_c.{c,pyx}
82
83 %clean
84 rm -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.093528 seconds and 3 git commands to generate.