diff --git a/py3c-1.0.tar.gz b/py3c-1.0.tar.gz deleted file mode 100644 index 1ed5878..0000000 --- a/py3c-1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f97fbc2eb5187df2499c3d5cf6c23ee0dac046eb0a88d67eea5e444cf116cd8e -size 45666 diff --git a/py3c-1.1.tar.gz b/py3c-1.1.tar.gz new file mode 100644 index 0000000..2c90265 --- /dev/null +++ b/py3c-1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7ffc22bc92dded0ca859db53ef3a0b466f89a9f8aad29359c9fe4ff18ebdd20 +size 45835 diff --git a/python-py3c.changes b/python-py3c.changes index b393e35..ef0bd04 100644 --- a/python-py3c.changes +++ b/python-py3c.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 11 08:06:18 UTC 2020 - Tomáš Chvátal + +- Update to 1.1: + * Fixes the py3.8 builds + ------------------------------------------------------------------- Mon May 28 14:18:49 UTC 2018 - t.gruner@katodev.de diff --git a/python-py3c.spec b/python-py3c.spec index 41aac02..8965e5d 100644 --- a/python-py3c.spec +++ b/python-py3c.spec @@ -1,7 +1,7 @@ # # spec file for package python-py3c # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,24 +12,26 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-py3c -Version: 1.0 +Version: 1.1 Release: 0 -License: MIT Summary: Python compatibility headers -Url: http://py3c.readthedocs.io/ -Group: Development/Languages/Python +License: MIT +URL: http://py3c.readthedocs.io/ Source: https://github.com/encukou/py3c/archive/v%{version}.tar.gz#/py3c-%{version}.tar.gz -BuildRequires: python-rpm-macros +Source99: python-py3c-rpmlintrc +# Needed for test build BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros BuildArch: noarch - %python_subpackages %description @@ -38,15 +40,6 @@ py3c helps you port C extensions to Python 3. It provides a detailed guide, and a set of macros to make porting easy and reduce boilerplate. - -Design principles ------------------ - -* Reduce chances of accidental subtle errors -* Minimize boilerplate -* Prefer the Python 3 way of doing things -* Minimize semantic changes under Python 2 - %prep %setup -q -n py3c-%{version} @@ -57,12 +50,30 @@ Design principles %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%check +pushd test +# Test C extension +%python_exec setup.py build +%{python_expand # copy the lib and run the test +cp ./build/lib.linux*-%{$python_bin_suffix}/test_py3c* ./ +$python __main__.py -v +} +# Test Cpp extension +rm -f test_py3c*.so +rm -rf build* +export TEST_USE_CPP="yes" +%python_exec setup.py build +%{python_expand # copy the lib and run the test +cp ./build/lib.linux*-%{$python_bin_suffix}/test_py3c* ./ +$python __main__.py -v +} +popd + %files %{python_files} %doc README.rst %{python_sitelib}/* -%python2_only %dir %{_includedir}/python%{python_bin_suffix}/py3c -%python2_only %{_includedir}/python%{python_bin_suffix}/py3c/*.h -%python3_only %dir %{_includedir}/python%{python_bin_suffix}m/py3c -%python3_only %{_includedir}/python%{python_bin_suffix}m/py3c/*.h +%dir %{_includedir}/python%{python_bin_suffix} +%dir %{_includedir}/python%{python_bin_suffix}/py3c +%{_includedir}/python%{python_bin_suffix}/py3c/*.h %changelog