| 
									
										
										
										
											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
										 |  |  | #
 | 
					
						
							| 
									
										
										
										
											2022-02-16 19:00:35 +00:00
										 |  |  | # Copyright (c) 2022 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-10-13 00:59:08 +00:00
										 |  |  | %{?!python_module:%define python_module() python3-%{**}}
 | 
					
						
							|  |  |  | %define skip_python2 1
 | 
					
						
							| 
									
										
										
										
											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
 | 
					
						
							|  |  |  | Name:           python-cryptography%{psuffix}
 | 
					
						
							| 
									
										
										
										
											2021-12-20 22:57:23 +00:00
										 |  |  | Version:        36.0.1
 | 
					
						
							| 
									
										
										
										
											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
 | 
					
						
							|  |  |  | Source1:        https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz.asc
 | 
					
						
							| 
									
										
										
										
											2021-11-29 11:07:36 +00:00
										 |  |  | # use `osc service disabledrun` to regenerate
 | 
					
						
							|  |  |  | Source2:        vendor.tar.xz
 | 
					
						
							|  |  |  | # 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
 | 
					
						
							| 
									
										
										
										
											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}
 | 
					
						
							| 
									
										
										
										
											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}
 | 
					
						
							| 
									
										
										
										
											2021-11-29 11:07:36 +00:00
										 |  |  | BuildRequires:  cargo >= 1.41.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
 | 
					
						
							| 
									
										
										
										
											2021-11-29 11:07:36 +00:00
										 |  |  | BuildRequires:  rust >= 1.41.0
 | 
					
						
							| 
									
										
										
										
											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
 | 
					
						
							| 
									
										
										
										
											2015-09-17 14:30:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-24 14:01:28 +00:00
										 |  |  | %build
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-16 19:00:35 +00:00
										 |  |  | %if !%{with test}
 | 
					
						
							| 
									
										
										
										
											2014-02-24 14:01:28 +00:00
										 |  |  | %install
 | 
					
						
							| 
									
										
										
										
											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
 | 
					
						
							| 
									
										
										
										
											2021-10-13 00:59:08 +00:00
										 |  |  | %pytest_arch -n auto
 | 
					
						
							| 
									
										
										
										
											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
 |