2014-02-24 15:01:28 +01:00
|
|
|
#
|
2022-02-16 20:00:35 +01:00
|
|
|
# spec file
|
2014-02-24 15:01:28 +01:00
|
|
|
#
|
- update to 39.0.0:
* **BACKWARDS INCOMPATIBLE:** Support for OpenSSL 1.1.0 has been removed.
Users on older version of OpenSSL will need to upgrade.
* **BACKWARDS INCOMPATIBLE:** Dropped support for LibreSSL < 3.5. The new
minimum LibreSSL version is 3.5.0. Going forward our policy is to support
versions of LibreSSL that are available in versions of OpenBSD that are
still receiving security support.
* **BACKWARDS INCOMPATIBLE:** Removed the ``encode_point`` and
``from_encoded_point`` methods on
:class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers`,
which had been deprecated for several years.
:meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.public_bytes`
and
:meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.from_encoded_point`
should be used instead.
* **BACKWARDS INCOMPATIBLE:** Support for using MD5 or SHA1 in
:class:`~cryptography.x509.CertificateBuilder`, other X.509 builders, and
PKCS7 has been removed.
* **ANNOUNCEMENT:** The next version of ``cryptography`` (40.0) will
change
the way we link OpenSSL. This will only impact users who build
``cryptography`` from source (i.e., not from a ``wheel``), and specify their
own version of OpenSSL. For those users, the ``CFLAGS``, ``LDFLAGS``,
``INCLUDE``, ``LIB``, and ``CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS`` environment
variables will no longer be respected. Instead, users will need to
configure their builds `as documented here`_.
* Added support for disabling the legacy provider in OpenSSL 3.0.x
* Added support for disabling RSA key validation checks when loading RSA
keys via
~cryptography.hazmat.primitives.serialization.load_pem_private_key
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=167
2023-01-02 20:50:55 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-02-24 15:01:28 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-06 12:48:48 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-24 15:01:28 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-10-13 02:59:08 +02:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2021-11-29 12:07:36 +01:00
|
|
|
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
|
2022-02-16 20:00:35 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
Name: python-cryptography%{psuffix}
|
2023-04-15 12:27:13 +02:00
|
|
|
Version: 40.0.2
|
2014-02-24 15:01:28 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Python library which exposes cryptographic recipes and primitives
|
2017-11-02 16:19:19 +01:00
|
|
|
License: Apache-2.0 OR BSD-3-Clause
|
2014-02-24 15:01:28 +01:00
|
|
|
Group: Development/Languages/Python
|
2018-03-27 14:55:23 +02:00
|
|
|
URL: https://cryptography.io/en/latest/
|
2017-03-30 16:12:18 +02:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
|
2021-11-29 12:07:36 +01:00
|
|
|
# use `osc service disabledrun` to regenerate
|
2022-05-24 08:59:20 +02:00
|
|
|
Source2: vendor.tar.zst
|
2021-11-29 12:07:36 +01:00
|
|
|
# use `osc service disabledrun` to regenerate
|
|
|
|
Source3: cargo_config
|
2022-02-16 20:00:35 +01:00
|
|
|
Source4: python-cryptography.keyring
|
2017-09-07 16:49:40 +02:00
|
|
|
Patch2: skip_openssl_memleak_test.patch
|
2022-06-13 08:38:29 +02:00
|
|
|
%if 0%{?sle_version} && 0%{?sle_version} <= 150400
|
|
|
|
Patch3: remove_python_3_6_deprecation_warning.patch
|
|
|
|
%endif
|
2021-10-13 02:59:08 +02:00
|
|
|
BuildRequires: %{python_module cffi >= 1.12}
|
2017-03-30 16:12:18 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2022-12-08 12:47:57 +01:00
|
|
|
BuildRequires: %{python_module exceptiongroup}
|
2021-11-29 12:07:36 +01:00
|
|
|
BuildRequires: %{python_module setuptools-rust}
|
2021-10-13 02:59:08 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-11-29 12:07:36 +01:00
|
|
|
BuildRequires: cargo >= 1.41.0
|
2017-11-02 16:19:19 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: pkgconfig
|
2017-03-30 16:12:18 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-11-29 12:07:36 +01:00
|
|
|
BuildRequires: rust >= 1.41.0
|
2022-05-24 08:59:20 +02:00
|
|
|
BuildRequires: zstd
|
2017-11-02 16:19:19 +01:00
|
|
|
BuildRequires: pkgconfig(libffi)
|
2021-10-13 02:59:08 +02:00
|
|
|
# python-base is not enough, we need the _ssl module
|
|
|
|
Requires: python
|
2022-02-16 20:00:35 +01:00
|
|
|
%requires_eq python-cffi
|
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module cryptography >= %{version}}
|
2021-10-13 02:59:08 +02:00
|
|
|
BuildRequires: %{python_module cryptography-vectors = %{version}}
|
2018-03-02 22:42:20 +01:00
|
|
|
BuildRequires: %{python_module hypothesis >= 1.11.4}
|
2017-03-30 16:12:18 +02:00
|
|
|
BuildRequires: %{python_module iso8601}
|
|
|
|
BuildRequires: %{python_module pretend}
|
2021-10-13 02:59:08 +02:00
|
|
|
BuildRequires: %{python_module pytest > 6.0}
|
2022-05-24 10:05:54 +02:00
|
|
|
BuildRequires: %{python_module pytest-benchmark}
|
2021-10-04 23:39:33 +02:00
|
|
|
BuildRequires: %{python_module pytest-subtests}
|
2021-10-13 02:59:08 +02:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
|
|
BuildRequires: %{python_module pytz}
|
2022-02-16 20:00:35 +01:00
|
|
|
%endif
|
2017-03-30 16:12:18 +02:00
|
|
|
%python_subpackages
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
cryptography is a package designed to expose cryptographic
|
|
|
|
recipes and primitives to Python developers. Our goal is
|
|
|
|
for it to be your "cryptographic standard library". It
|
2018-06-12 10:00:09 +02:00
|
|
|
supports Python 2.7, Python 3.4+, and PyPy-5.3+.
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
cryptography includes both high level recipes, and low
|
|
|
|
level interfaces to common cryptographic algorithms such as
|
|
|
|
symmetric ciphers, message digests and key derivation
|
|
|
|
functions.
|
|
|
|
|
|
|
|
%prep
|
2021-11-29 12:07:36 +01:00
|
|
|
%autosetup -a2 -p1 -n cryptography-%{version}
|
|
|
|
mkdir .cargo
|
|
|
|
cp %{SOURCE3} .cargo/config
|
2022-05-24 08:59:20 +02:00
|
|
|
rm -v src/rust/Cargo.lock
|
2015-09-17 16:30:34 +02:00
|
|
|
|
2014-02-24 15:01:28 +01:00
|
|
|
%build
|
2021-11-29 12:07:36 +01:00
|
|
|
export RUSTFLAGS=%{rustflags}
|
2017-03-30 16:12:18 +02:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
%python_build
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
%install
|
2022-02-16 20:56:54 +01:00
|
|
|
%if !%{with test}
|
2021-11-29 12:07:36 +01:00
|
|
|
export RUSTFLAGS=%{rustflags}
|
2019-05-29 17:01:07 +02:00
|
|
|
# Actually other *.c and *.h are appropriate
|
|
|
|
# see https://github.com/pyca/cryptography/issues/1463
|
|
|
|
find . -name .keep -print -delete
|
|
|
|
|
2017-03-30 16:12:18 +02:00
|
|
|
%python_install
|
2018-12-06 12:48:48 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2022-02-16 20:00:35 +01:00
|
|
|
%endif
|
2014-02-24 15:01:28 +01:00
|
|
|
|
2022-02-16 20:00:35 +01:00
|
|
|
%if %{with test}
|
2014-04-01 10:25:31 +02:00
|
|
|
%check
|
2023-01-05 22:13:05 +01:00
|
|
|
# won't work for cryptography
|
|
|
|
%pytest_arch -n auto --ignore-glob=vendor/*
|
2022-02-16 20:00:35 +01:00
|
|
|
%endif
|
2014-02-24 15:01:28 +01:00
|
|
|
|
2022-02-16 20:00:35 +01:00
|
|
|
%if !%{with test}
|
2017-03-30 16:12:18 +02:00
|
|
|
%files %{python_files}
|
2018-03-26 09:50:13 +02:00
|
|
|
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
2021-10-04 23:39:33 +02:00
|
|
|
%doc CONTRIBUTING.rst CHANGELOG.rst README.rst
|
2021-10-13 02:59:08 +02:00
|
|
|
%{python_sitearch}/cryptography
|
|
|
|
%{python_sitearch}/cryptography-%{version}*-info
|
2022-02-16 20:00:35 +01:00
|
|
|
%endif
|
2014-02-24 15:01:28 +01:00
|
|
|
|
|
|
|
%changelog
|