-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-cryptography.spec
More file actions
72 lines (58 loc) · 1.83 KB
/
python-cryptography.spec
File metadata and controls
72 lines (58 loc) · 1.83 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
70
71
72
%undefine _debugsource_packages
%define pname cryptography
%define name python-%{pname}
Summary: crytographic recipes for python
Name: python-%{pname}
Version: 44.0.1
Release: 1
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: https://src.fedoraproject.org/rpms/python-cryptography/raw/rawhide/f/vendor_rust.py
Source1000: %{name}.rpmlintrc
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python)
BuildRequires: python%{pyver}dist(pip)
BuildRequires: python%{pyver}dist(cffi)
BuildRequires: python%{pyver}dist(maturin)
BuildRequires: python%{pyver}dist(setuptools-rust) >= 1.8.0
BuildRequires: python-six
BuildRequires: python-distribute
BuildRequires: rust
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
%{py_platsitedir}/cryptography
%{py_platsitedir}/cryptography-*.*info
%{py_platsitedir}/rust
%files doc
%doc README.rst CHANGELOG.rst