diff --git a/python-cryptography.changes b/python-cryptography.changes index ecd6139..bb2eb90 100644 --- a/python-cryptography.changes +++ b/python-cryptography.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 29 14:41:39 UTC 2019 - Tomáš Chvátal + +- Simplify the test execution to be more understandable + ------------------------------------------------------------------- Thu Feb 28 19:50:33 UTC 2019 - Michael Ströder diff --git a/python-cryptography.spec b/python-cryptography.spec index 442852e..7b12e0c 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -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