Registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.

About project

PyCA's cryptography library

Last commit

avatar
proklov_av has added baf03f5740
Update version to 44.0.1

Files in

100644 | 82 lines (68 sloc) | 2.07 KB
# see https://github.com/pyca/cryptography/issues/9023
%global _disable_lto 1

%global	debug_package %{nil}

%global pypi_name cryptography

Summary:	PyCA's cryptography library
Name:		python-%{pypi_name}
Version:	44.0.1
Release:	1
License:	ASL 2.0 or BSD
Group:		Development/Python
Url:		https://cryptography.io/en/latest
Source0:	%pypi_source
# use upd.sh for create vendor archive
Source1:	cryptography-vendor-44.0.1.tar.xz
Source10:	upd.sh
BuildRequires:	pyproject-rpm-macros
BuildRequires:	cargo
BuildRequires:	rust
BuildRequires:	python3dist(bcrypt)
BuildRequires:	python3dist(cryptography-vectors)
BuildRequires:	python3dist(pretend)
BuildRequires:	python3dist(pytest)
BuildRequires:	python3dist(pytest-benchmark)
BuildRequires:	python3dist(certifi)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(python3)

%description
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.

#----------------------------------------------------------------------------

%package -n python3-%{pypi_name}
Summary:	PyCA's cryptography library
Group:		Development/Python
Requires:	openssl
Requires:	python3dist(cffi)
Requires:	python3dist(six)

%description -n python3-%{pypi_name}
cryptography is a package designed to expose cryptographic primitives and
recipes to Python developers.

%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst docs
%license LICENSE LICENSE.APACHE LICENSE.BSD
# Humm may be wrong place?
%{python3_sitearch}/rust

#----------------------------------------------------------------------------

%prep
%autosetup -p1 -n %{pypi_name}-%{version} -a1
mkdir .cargo
cat >.cargo/config.toml <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF

%generate_buildrequires
%pyproject_buildrequires -r

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{pypi_name}

%check
# some tests fail on i686, not supported arch
%ifnarch %{ix86}
sed -i "s/ --benchmark-disable//" pyproject.toml
sed -i "/def test_vector_version/,/^$/d" tests/test_utils.py
%pytest
%endif