/
python-josepy.spec
60 lines (45 loc) · 1.51 KB
/
python-josepy.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%global pypi_name josepy
%global py3_prefix python%{python3_pkgversion}
%bcond_with docs
Name: python3-%{pypi_name}
Version: 1.10.0
Release: 1%{?dist}
Summary: JOSE protocol implementation in Python
License: ASL 2.0
URL: https://pypi.python.org/pypi/josepy
Source0: %{pypi_source}
Source1: %{pypi_source}.asc
Source2: https://dl.eff.org/certbot.pub
BuildArch: noarch
# Remove various unpackaged testing dependencies that are used only for linting
Patch0: 0000-ignore-missing-linters.patch
BuildRequires: %{py3_prefix}-cryptography
BuildRequires: %{py3_prefix}-devel
BuildRequires: %{py3_prefix}-pytest
BuildRequires: %{py3_prefix}-pyOpenSSL
BuildRequires: %{py3_prefix}-setuptools
# Used to verify OpenPGP signature
BuildRequires: gnupg2
%description
JOSE protocol implementation in Python using cryptography.
This is the Python 3 version of the package.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
rm %{buildroot}%{_bindir}/jws
%check
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -x -v
%files
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/josepy
%{python3_sitelib}/josepy-%{version}-py%{python3_version}.egg-info
%changelog
* Thu Sep 30 2021 Felix Schwarz <fschwarz@fedoraproject.org> - 1.10.0-1
- initial Python 3 package for EPEL 7