]> git.pld-linux.org Git - packages/python3-josepy.git/blob - python3-josepy.spec
- josepy 1.13 requires python 3.6+, so moved to python3-josepy.spec; added tests...
[packages/python3-josepy.git] / python3-josepy.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 %define         module  josepy
7 Summary:        JOSE protocol implementation
8 Summary(pl.UTF-8):      Implementacja protokołu JOSE
9 Name:           python3-%{module}
10 Version:        1.13.0
11 Release:        2
12 License:        Apache v2.0
13 Group:          Development/Languages/Python
14 Source0:        https://files.pythonhosted.org/packages/source/j/josepy/josepy-%{version}.tar.gz
15 # Source0-md5:  d0f8dc9ffbf3ce0bd9c40e5ec1bf3516
16 URL:            https://josepy.readthedocs.io/en/latest/
17 BuildRequires:  python3-devel >= 1:3.6
18 BuildRequires:  python3-setuptools >= 1.0
19 %if %{with tests}
20 BuildRequires:  python3-cryptography >= 1.5
21 BuildRequires:  python3-pyOpenSSL >= 0.13
22 BuildRequires:  python3-pytest >= 2.8.0
23 BuildRequires:  python3-pytest-cov
24 %endif
25 %if %{with doc}
26 BuildRequires:  python3-Sphinx >= 1.0
27 BuildRequires:  python3-cryptography >= 1.5
28 BuildRequires:  python3-pyOpenSSL >= 0.13
29 BuildRequires:  python3-sphinx_rtd_theme >= 1.0
30 %endif
31 Conflicts:      python-josepy < 1.13.0-2
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 This package provides JOSE protocol implementation.
37
38 %description -l pl.UTF-8
39 Ten pakiet zawiera implementację protokołu JOSE.
40
41 %package apidocs
42 Summary:        API documentation for josepy module
43 Summary(pl.UTF-8):      Dokumentacja API modułu josepy
44 Group:          Documentation
45
46 %description apidocs
47 API documentation for josepy module.
48
49 %description apidocs -l pl.UTF-8
50 Dokumentacja API modułu josepy.
51
52 %prep
53 %setup -q -n %{module}-%{version}
54
55 %build
56 %py3_build
57
58 %if %{with tests}
59 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
60 PYTEST_PLUGINS="pytest_cov.plugin" \
61 PYTHONPATH=$(pwd)/src \
62 %{__python3} -m pytest tests
63 %endif
64
65 %if %{with doc}
66 PYTHONPATH=$(pwd)/src \
67 %{__make} -C docs html \
68         SPHINXBUILD="%{__python3} -m sphinx"
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %py3_install
75
76 %{__mv} $RPM_BUILD_ROOT%{_bindir}/jws{,-3}
77 ln -sf jws-3 $RPM_BUILD_ROOT%{_bindir}/jws
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc CHANGELOG.rst README.rst
85 %attr(755,root,root) %{_bindir}/jws
86 %attr(755,root,root) %{_bindir}/jws-3
87 %{py3_sitescriptdir}/josepy
88 %{py3_sitescriptdir}/josepy-%{version}-py*.egg-info
89
90 %files apidocs
91 %defattr(644,root,root,755)
92 %doc docs/_build/html/{_static,api,man,*.html,*.js}
This page took 0.185273 seconds and 3 git commands to generate.