2014-02-24 14:01:28 +00:00
|
|
|
#
|
2022-02-16 19:00:35 +00:00
|
|
|
# spec file
|
2014-02-24 14:01:28 +00: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 19:50:55 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-02-24 14:01:28 +00: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 11:48:48 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-24 14:01:28 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-11-29 11:07:36 +00:00
|
|
|
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
|
2022-02-16 19:00:35 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-22 06:18:33 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-02-16 19:00:35 +00:00
|
|
|
Name: python-cryptography%{psuffix}
|
- update to 41.0.5:
* Updated Windows, macOS, and Linux wheels to be compiled with
OpenSSL 3.1.4.
* Added a function to support an upcoming ``pyOpenSSL``
release.
parameters in X.509 certificates, which are
* Fixed error when using py2app to build an application with a cryptography dependency.
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 1.1.1n.
- split tests in a multibuild variant to optimize rebuild time a bit
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 1.1.1m.
- drop disable-RustExtension.patch: building rust extension now
* Re-added a legacy symbol causing problems for older ``pyOpenSSL`` use
signature.
* wheels compiled with OpenSSL 1.1.1h.
- Removed support for calling public_bytes() with no arguments, as per
* BACKWARDS INCOMPATIBLE:
Removedcryptography.hazmat.primitives.asymmetric.utils.encode_rfc6979_signature
andcryptography.hazmat.primitives.asymmetric.utils.decode_rfc6979_signature,
which had been deprecated for nearly 4 years. Use encode_dss_signature()
* BACKWARDS INCOMPATIBLE: Removed cryptography.x509.Certificate.serial, which
* Add support for easily mapping an object identifier to its elliptic curve
* Add support for OpenSSL when compiled with the no-engine
* BACKWARDS INCOMPATIBLE: U-label strings were deprecated in version 2.1,
but this version removes the default idna dependency as well. If you still
need this deprecated path please install cryptography with the idna extra:
* Numerous classes and functions have been updated to allow bytes-like
types for keying material and passwords, including symmetric algorithms,
* Added rfc4514_string() method to x509.Name,
x509.RelativeDistinguishedName, and x509.NameAttribute to format the name
* Added from_encoded_point(), which immediately checks if the point is on
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=200
2023-11-10 13:29:19 +00:00
|
|
|
Version: 41.0.5
|
2014-02-24 14:01:28 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python library which exposes cryptographic recipes and primitives
|
2017-11-02 15:19:19 +00:00
|
|
|
License: Apache-2.0 OR BSD-3-Clause
|
2014-02-24 14:01:28 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-03-27 12:55:23 +00:00
|
|
|
URL: https://cryptography.io/en/latest/
|
2017-03-30 14:12:18 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
|
2021-11-29 11:07:36 +00:00
|
|
|
# use `osc service disabledrun` to regenerate
|
2022-05-24 06:59:20 +00:00
|
|
|
Source2: vendor.tar.zst
|
2021-11-29 11:07:36 +00:00
|
|
|
# use `osc service disabledrun` to regenerate
|
|
|
|
Source3: cargo_config
|
2022-02-16 19:00:35 +00:00
|
|
|
Source4: python-cryptography.keyring
|
2017-09-07 14:49:40 +00:00
|
|
|
Patch2: skip_openssl_memleak_test.patch
|
2023-07-11 05:55:34 +00:00
|
|
|
# PATCH-FEATURE-OPENSUSE no-pytest_benchmark.patch mcepl@suse.com
|
|
|
|
# We don't need no benchmarking and coverage measurement
|
|
|
|
Patch4: no-pytest_benchmark.patch
|
2021-10-13 00:59:08 +00:00
|
|
|
BuildRequires: %{python_module cffi >= 1.12}
|
2017-03-30 14:12:18 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2022-12-08 11:47:57 +00:00
|
|
|
BuildRequires: %{python_module exceptiongroup}
|
2021-11-29 11:07:36 +00:00
|
|
|
BuildRequires: %{python_module setuptools-rust}
|
2021-10-13 00:59:08 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-06-19 20:44:25 +00:00
|
|
|
BuildRequires: cargo >= 1.56.0
|
2017-11-02 15:19:19 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: pkgconfig
|
2017-03-30 14:12:18 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2023-06-19 20:44:25 +00:00
|
|
|
BuildRequires: rust >= 1.56.0
|
2022-05-24 06:59:20 +00:00
|
|
|
BuildRequires: zstd
|
2017-11-02 15:19:19 +00:00
|
|
|
BuildRequires: pkgconfig(libffi)
|
2021-10-13 00:59:08 +00:00
|
|
|
# python-base is not enough, we need the _ssl module
|
|
|
|
Requires: python
|
2022-02-16 19:00:35 +00:00
|
|
|
%requires_eq python-cffi
|
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module cryptography >= %{version}}
|
2021-10-13 00:59:08 +00:00
|
|
|
BuildRequires: %{python_module cryptography-vectors = %{version}}
|
2018-03-02 21:42:20 +00:00
|
|
|
BuildRequires: %{python_module hypothesis >= 1.11.4}
|
2017-03-30 14:12:18 +00:00
|
|
|
BuildRequires: %{python_module iso8601}
|
|
|
|
BuildRequires: %{python_module pretend}
|
2021-10-13 00:59:08 +00:00
|
|
|
BuildRequires: %{python_module pytest > 6.0}
|
2021-10-04 21:39:33 +00:00
|
|
|
BuildRequires: %{python_module pytest-subtests}
|
2021-10-13 00:59:08 +00:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
|
|
BuildRequires: %{python_module pytz}
|
2022-02-16 19:00:35 +00:00
|
|
|
%endif
|
2017-03-30 14:12:18 +00:00
|
|
|
%python_subpackages
|
2014-02-24 14:01:28 +00: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 08:00:09 +00:00
|
|
|
supports Python 2.7, Python 3.4+, and PyPy-5.3+.
|
2014-02-24 14:01:28 +00: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 11:07:36 +00:00
|
|
|
%autosetup -a2 -p1 -n cryptography-%{version}
|
|
|
|
mkdir .cargo
|
|
|
|
cp %{SOURCE3} .cargo/config
|
2022-05-24 06:59:20 +00:00
|
|
|
rm -v src/rust/Cargo.lock
|
2015-09-17 14:30:34 +00:00
|
|
|
|
2014-02-24 14:01:28 +00:00
|
|
|
%build
|
2023-06-20 17:14:00 +00:00
|
|
|
# https://github.com/pyca/cryptography/issues/9023
|
|
|
|
%global _lto_cflags %{nil}
|
2021-11-29 11:07:36 +00:00
|
|
|
export RUSTFLAGS=%{rustflags}
|
2017-03-30 14:12:18 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
%python_build
|
2014-02-24 14:01:28 +00:00
|
|
|
|
|
|
|
%install
|
2022-02-16 19:56:54 +00:00
|
|
|
%if !%{with test}
|
2021-11-29 11:07:36 +00:00
|
|
|
export RUSTFLAGS=%{rustflags}
|
2019-05-29 15:01:07 +00:00
|
|
|
# Actually other *.c and *.h are appropriate
|
|
|
|
# see https://github.com/pyca/cryptography/issues/1463
|
|
|
|
find . -name .keep -print -delete
|
|
|
|
|
2017-03-30 14:12:18 +00:00
|
|
|
%python_install
|
2018-12-06 11:48:48 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2022-02-16 19:00:35 +00:00
|
|
|
%endif
|
2014-02-24 14:01:28 +00:00
|
|
|
|
2022-02-16 19:00:35 +00:00
|
|
|
%if %{with test}
|
2014-04-01 08:25:31 +00:00
|
|
|
%check
|
2023-01-05 21:13:05 +00:00
|
|
|
# won't work for cryptography
|
|
|
|
%pytest_arch -n auto --ignore-glob=vendor/*
|
2022-02-16 19:00:35 +00:00
|
|
|
%endif
|
2014-02-24 14:01:28 +00:00
|
|
|
|
2022-02-16 19:00:35 +00:00
|
|
|
%if !%{with test}
|
2017-03-30 14:12:18 +00:00
|
|
|
%files %{python_files}
|
2018-03-26 07:50:13 +00:00
|
|
|
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
2021-10-04 21:39:33 +00:00
|
|
|
%doc CONTRIBUTING.rst CHANGELOG.rst README.rst
|
2021-10-13 00:59:08 +00:00
|
|
|
%{python_sitearch}/cryptography
|
|
|
|
%{python_sitearch}/cryptography-%{version}*-info
|
2022-02-16 19:00:35 +00:00
|
|
|
%endif
|
2014-02-24 14:01:28 +00:00
|
|
|
|
|
|
|
%changelog
|