]> git.pld-linux.org Git - packages/python3-pyjwt.git/blob - python3-pyjwt.spec
rebuild with tests and docs
[packages/python3-pyjwt.git] / python3-pyjwt.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # API documentation
4 %bcond_with     tests   # unit tests
5
6 %define         module  pyjwt
7 Summary:        JSON Web Token implementation in Python 3
8 Summary(pl.UTF-8):      Implementacja JSON Web Token w Pythonie 3
9 Name:           python3-%{module}
10 Version:        2.0.1
11 Release:        4
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/pyjwt/
15 Source0:        https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-%{version}.tar.gz
16 # Source0-md5:  93b74f59d08be8c852a3c259da2ea121
17 URL:            http://github.com/jpadilla/pyjwt
18 BuildRequires:  python3-modules >= 1:3.6
19 BuildRequires:  python3-setuptools
20 %if %{with tests}
21 BuildRequires:  python3-cryptography >= 3.3.1
22 BuildRequires:  python3-pytest >= 5.0.0
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.714
26 %if %{with doc}
27 BuildRequires:  python3-sphinx_rtd_theme
28 BuildRequires:  sphinx-pdg-3
29 %endif
30 # file and namespace conflict
31 Conflicts:      python3-jwt
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 A Python implementation of RFC 7519. Original implementation was
37 written by @progrium.
38
39 %description -l pl.UTF-8
40 Pythonowa implementacja RFC 7519. Oryginalna implementacja została
41 napisana przez @progrium.
42
43 %package apidocs
44 Summary:        API documentation for PyJWT
45 Summary(pl.UTF-8):      Dokumentacja API moduły PyJWT
46 Group:          Documentation
47
48 %description apidocs
49 API documentation for PyJWT.
50
51 %description apidocs -l pl.UTF-8
52 Dokumentacja API moduły PyJWT.
53
54 %prep
55 %setup -q -n PyJWT-%{version}
56
57 # Remove bundled egg-info
58 %{__rm} -r PyJWT.egg-info
59
60 %build
61 %py3_build
62
63 %if %{with tests}
64 %{__python3} -m pytest tests
65 %endif
66
67 %if %{with doc}
68 %{__make} -C docs html \
69         SPHINXBUILD=sphinx-build-3
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %py3_install
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %files
81 %defattr(644,root,root,755)
82 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
83 %{py3_sitescriptdir}/jwt
84 %{py3_sitescriptdir}/PyJWT-%{version}-py*.egg-info
85
86 %if %{with doc}
87 %files apidocs
88 %defattr(644,root,root,755)
89 %doc docs/_build/html/{_static,*.html,*.js}
90 %endif
This page took 0.059457 seconds and 3 git commands to generate.