From 6cce866af292867f94864eb00f91f6a43fdaee84f0c1278edee86b68c1978795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 4 Jun 2025 07:57:45 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py3c?expand=0&rev=16 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + py3c-1.4.tar.gz | 3 ++ python-py3c-rpmlintrc | 1 + python-py3c.changes | 66 +++++++++++++++++++++++++++++ python-py3c.spec | 99 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 py3c-1.4.tar.gz create mode 100644 python-py3c-rpmlintrc create mode 100644 python-py3c.changes create mode 100644 python-py3c.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/py3c-1.4.tar.gz b/py3c-1.4.tar.gz new file mode 100644 index 0000000..377d97a --- /dev/null +++ b/py3c-1.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abc745079ef906148817f4472c3fb4bc41d62a9ea51a746b53e09819494ac006 +size 48112 diff --git a/python-py3c-rpmlintrc b/python-py3c-rpmlintrc new file mode 100644 index 0000000..67d25fd --- /dev/null +++ b/python-py3c-rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package") diff --git a/python-py3c.changes b/python-py3c.changes new file mode 100644 index 0000000..de105e5 --- /dev/null +++ b/python-py3c.changes @@ -0,0 +1,66 @@ +------------------------------------------------------------------- +Wed Jun 4 07:56:59 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Tue Oct 4 23:42:12 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version v1.4 (2021-10-15) + Additions: + add guidance around the use of Py_FindMethod (thanks to David Aguilar) + Fixes: + Avoid compiler warning about unused function + Fix DESTDIR support in the Makefile (thanks to David Aguilar) + Various documentation warning fixes (thanks to David Aguilar) + Project infrastructure: + Switch to GitHub Actions for pull request tests + +------------------------------------------------------------------- +Thu Jul 14 20:42:53 UTC 2022 - Ben Greiner + +- Fix test build paths for setuptools 63 + +------------------------------------------------------------------- +Sat Mar 20 20:59:07 UTC 2021 - Ben Greiner + +- Update to 1.3.1 + * Allow building the documentation without sphinx_rtd_theme +- Release 1.3 + * Tested with Python 3.9.0 + * To help avoid compiler warning about uninitialized members, + extra members are added to the PyModuleDef structure for Python + 2: m_slots, m_traverse, m_clear and m_free. Under Python 2, + they must be set to NULL (usually by continuing to leave them + out). +- Release 1.2 + * Tests updated to pass with Python 3.9.0b3 + * make install now honors DESTDIR to support staged installations +- drop destdir.patch fixed upstream + +------------------------------------------------------------------- +Tue Jun 23 08:17:27 UTC 2020 - Jan Engelhardt + +- Trim conjecture from descriptions. + +------------------------------------------------------------------- +Mon Jun 15 09:20:00 UTC 2020 - Tomáš Chvátal + +- Install license file + +------------------------------------------------------------------- +Thu Jun 11 08:32:54 UTC 2020 - Tomáš Chvátal + +- Add destdir.patch to fix pc file and includes install + +------------------------------------------------------------------- +Thu Jun 11 08:06:18 UTC 2020 - Tomáš Chvátal + +- Update to 1.1 bsc#1173807: + * Fixes the py3.8 builds + +------------------------------------------------------------------- +Mon May 28 14:18:49 UTC 2018 - t.gruner@katodev.de + +- Initial release 1.0 + diff --git a/python-py3c.spec b/python-py3c.spec new file mode 100644 index 0000000..bbe40ef --- /dev/null +++ b/python-py3c.spec @@ -0,0 +1,99 @@ +# +# spec file for package python-py3c +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-py3c +Version: 1.4 +Release: 0 +Summary: Python compatibility headers +License: MIT +URL: https://py3c.readthedocs.io/ +Source: https://github.com/encukou/py3c/archive/v%{version}.tar.gz#/py3c-%{version}.tar.gz +Source99: python-py3c-rpmlintrc +# Needed for test build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +py3c helps porting C extensions to Python 3. + +It provides a guide, and a set of macros to facilitate porting +and reduce boilerplate. + +%package -n py3c-devel +Summary: Development files for py3c + +%description -n py3c-devel +py3c helps porting C extensions to Python 3. + +%prep +%setup -q -n py3c-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +# we will use the make install to deploy includes +rm -r %{buildroot}%{_includedir}/* +%make_install prefix=%{_prefix} +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +pushd test +# Test C extension +%pyproject_wheel +%{python_expand # copy the lib and run the test +cp ./build/lib.linux*/test_py3c* ./ +$python __main__.py -v +rm -f test_py3c*.so +rm -rf build +} +# Test Cpp extension +export TEST_USE_CPP="yes" +%pyproject_wheel +%{python_expand # copy the lib and run the test +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}/py3c-%{version}*-info + +%files -n py3c-devel +%{_includedir}/py3c.h +%dir %{_includedir}/py3c +%{_includedir}/py3c/capsulethunk.h +%{_includedir}/py3c/comparison.h +%{_includedir}/py3c/compat.h +%{_includedir}/py3c/fileshim.h +%{_includedir}/py3c/py3shims.h +%{_includedir}/py3c/tpflags.h +%{_datadir}/pkgconfig/py3c.pc + +%changelog