-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-cryptography.spec
More file actions
69 lines (55 loc) · 1.67 KB
/
python-cryptography.spec
File metadata and controls
69 lines (55 loc) · 1.67 KB
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
61
62
63
64
65
66
67
68
69
#define debug_package %nil
%define pname cryptography
%define name python-%{pname}
Summary: crytographic recipes for python
Name: python-%{pname}
Version: 39.0.0
Release: 2
License: LGPLv2
Group: Development/Python
Url: https://github.com/pyca/cryptography
Source0: https://github.com/pyca/cryptography/archive/%{version}/%{pname}-%{version}.tar.gz
# Generate using vendor_rust.py (Source100) with network on
Source1: cryptography-%{version}-vendor.tar.bz2
Source100: %{name}.rpmlintrc
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python)
BuildRequires: python%{pyver}dist(pip)
BuildRequires: python%{pyver}dist(setuptools-rust)
BuildRequires: python-six
BuildRequires: python-cffi
BuildRequires: python-distribute
Requires: python-pkg-resources
%description
cryptography is a package which provides cryptographic recipes
and primitives to Python developers.
cryptography includes both high level recipes, and low level
interfaces to common cryptographic algorithms such as symmetric
ciphers, message digests and key derivation functions.
%package doc
Summary: Documentation for python-%{pname}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%autosetup -n %{pname}-%{version} -p1
mkdir -p .cargo
cat >> .cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "./vendor"
EOF
tar xf %{SOURCE1}
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%py_build
%install
%py_install
%files
%dir %{py_platsitedir}/cryptography
%{py_platsitedir}/cryptography/*
%{py_platsitedir}/cryptography-*.*info
%files doc
%doc README.rst CHANGELOG.rst