- Simplify the test execution to be more understandable
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=114
This commit is contained in:
parent
8f97047f3b
commit
ecd325a1e4
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 29 14:41:39 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Simplify the test execution to be more understandable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 28 19:50:33 UTC 2019 - Michael Ströder <michael@stroeder.com>
|
||||
|
||||
|
@ -28,13 +28,12 @@ URL: https://cryptography.io/en/latest/
|
||||
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
|
||||
Source2: %{name}.keyring
|
||||
# found on pypi but not on pythonhosted :/
|
||||
Source3: https://files.pythonhosted.org/packages/source/c/cryptography_vectors/cryptography_vectors-%{version}.tar.gz
|
||||
# PATCH-FIX-SLE disable-uneven-sizes-tests.patch bnc#944204
|
||||
Patch1: disable-uneven-sizes-tests.patch
|
||||
Patch2: skip_openssl_memleak_test.patch
|
||||
BuildRequires: %{python_module asn1crypto >= 0.21.0}
|
||||
BuildRequires: %{python_module cffi >= 1.7}
|
||||
BuildRequires: %{python_module cryptography-vectors = %{version}}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module idna >= 2.1}
|
||||
BuildRequires: %{python_module pyasn1-modules}
|
||||
@ -89,7 +88,7 @@ symmetric ciphers, message digests and key derivation
|
||||
functions.
|
||||
|
||||
%prep
|
||||
%setup -q -n cryptography-%{version} -a3
|
||||
%setup -q -n cryptography-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
@ -98,24 +97,15 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%python_build
|
||||
|
||||
%install
|
||||
# Actually other *.c and *.h are appropriate
|
||||
# see https://github.com/pyca/cryptography/issues/1463
|
||||
find . -name .keep -print -delete
|
||||
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
%{python_expand # this is going to be fun
|
||||
# create virtualenv
|
||||
$python %{_bindir}/virtualenv --system-site-packages TESTROOT-%{$python_bin_suffix}
|
||||
. TESTROOT-%{$python_bin_suffix}/bin/activate
|
||||
# install package in virtualenv
|
||||
$python setup.py install
|
||||
# install cryptography vectors
|
||||
(cd cryptography_vectors-%{version} && $python setup.py install)
|
||||
# run tests with virtualenv'd python
|
||||
# (specify "tests" directory, otherwise py.test discovers tests in virtualenv'd setuptools)
|
||||
$python -m pytest tests
|
||||
# finish
|
||||
deactivate
|
||||
}
|
||||
%pytest_arch
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE LICENSE.APACHE LICENSE.BSD
|
||||
|
Loading…
Reference in New Issue
Block a user