14
0
forked from pool/python-py3c

Accepting request 989257 from home:bnavigator:branches:devel:languages:python

- Fix test build paths for setuptools 63

OBS-URL: https://build.opensuse.org/request/show/989257
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py3c?expand=0&rev=12
This commit is contained in:
2022-07-15 07:03:35 +00:00
committed by Git OBS Bridge
parent 68dfa51309
commit 9708836b80
2 changed files with 14 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-py3c
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -62,26 +62,27 @@ rm -r %{buildroot}%{_includedir}/*
%check
pushd test
# Test C extension
%python_exec setup.py build
%python_build
%{python_expand # copy the lib and run the test
cp ./build/lib.linux*-%{$python_bin_suffix}/test_py3c* ./
cp ./build/lib.linux*/test_py3c* ./
$python __main__.py -v
rm -f test_py3c*.so
rm -rf build
}
# Test Cpp extension
rm -f test_py3c*.so
rm -rf build*
export TEST_USE_CPP="yes"
%python_exec setup.py build
%python_build
%{python_expand # copy the lib and run the test
cp ./build/lib.linux*-%{$python_bin_suffix}/test_py3c* ./
cp ./build/lib.linux*/test_py3c* ./
$python __main__.py -v
rm -f test_py3c*.so
}
popd
%files %{python_files}
%doc README.rst
%license LICENSE.MIT
%{python_sitelib}/*
%{python_sitelib}/py3c-%{version}*-info
%files -n py3c-devel
%{_includedir}/py3c.h