Fix py.test calling
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=54
This commit is contained in:
parent
b8ddb5dcdb
commit
5b720e63b6
@ -26,8 +26,6 @@ Group: Development/Languages/Python
|
||||
URL: http://cffi.readthedocs.org
|
||||
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
|
||||
Source1: python-cffi-rpmlintrc
|
||||
Source2: test_cos_01.py
|
||||
Source3: test_cos_02.py
|
||||
# https://bitbucket.org/cffi/cffi/issues/384/
|
||||
Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
|
||||
# https://bitbucket.org/cffi/cffi/issues/378
|
||||
@ -52,9 +50,6 @@ is to provide a convenient and reliable way of calling C code from Python.
|
||||
%setup -q -n cffi-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
cp -v -p %{SOURCE2} .
|
||||
cp -v -p %{SOURCE3} .
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
%python_build
|
||||
@ -66,13 +61,8 @@ export CFLAGS="%{optflags}"
|
||||
%check
|
||||
# https://bitbucket.org/cffi/cffi/issues/390/
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||
py.test-%$python_bin_suffix -k test_dlopen_filename -W ignore::UserWarning c/ testing/
|
||||
py.test-%$python_bin_suffix -v -k 'not test_dlopen' -W ignore::UserWarning c/ testing/
|
||||
}
|
||||
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
||||
echo "Testing test_cos_01.py"
|
||||
python2 test_cos_01.py
|
||||
echo "Testing test_cos_02.py"
|
||||
python2 test_cos_02.py
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
@ -1,6 +0,0 @@
|
||||
import cffi, ctypes.util
|
||||
ctypes.util.find_library('m')
|
||||
ffi = cffi.FFI()
|
||||
ffi.cdef("double cos(double);")
|
||||
print(ffi.dlopen('m').cos(1.23))
|
||||
print(ffi.dlopen('libm.so.6').cos(1.23))
|
@ -1,6 +0,0 @@
|
||||
import cffi, ctypes.util
|
||||
ctypes.util.find_library('m')
|
||||
ffi = cffi.FFI()
|
||||
ffi.cdef("double cos(double);")
|
||||
print(ffi.dlopen('libm.so.6').cos(1.23))
|
||||
print(ffi.dlopen('m').cos(1.23))
|
Loading…
x
Reference in New Issue
Block a user