14
0
forked from pool/python-py3c

- Update to 1.1:

* Fixes the py3.8 builds

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py3c?expand=0&rev=2
This commit is contained in:
Tomáš Chvátal
2020-06-11 08:27:13 +00:00
committed by Git OBS Bridge
parent 8323d3c3f4
commit d85d16e4f7
4 changed files with 41 additions and 24 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f97fbc2eb5187df2499c3d5cf6c23ee0dac046eb0a88d67eea5e444cf116cd8e
size 45666

3
py3c-1.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c7ffc22bc92dded0ca859db53ef3a0b466f89a9f8aad29359c9fe4ff18ebdd20
size 45835

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 11 08:06:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 1.1:
* Fixes the py3.8 builds
-------------------------------------------------------------------
Mon May 28 14:18:49 UTC 2018 - t.gruner@katodev.de

View File

@@ -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