[packages/python-ctypesgen] - rel 7, python3 moved to dedicated package

baggins baggins at pld-linux.org
Sun Mar 23 11:56:08 CET 2025


commit 090f7602ec15faaacc47509b1f24e230dae3c0a6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Mar 23 11:55:49 2025 +0100

    - rel 7, python3 moved to dedicated package

 python-ctypesgen.spec | 63 ++-------------------------------------------------
 1 file changed, 2 insertions(+), 61 deletions(-)
---
diff --git a/python-ctypesgen.spec b/python-ctypesgen.spec
index fe727c9..2bbb183 100644
--- a/python-ctypesgen.spec
+++ b/python-ctypesgen.spec
@@ -1,15 +1,13 @@
 #
 # Conditional build:
 %bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
 
-%define 	module	ctypesgen
+%define		module	ctypesgen
 Summary:	A pure-python wrapper generator for ctypes
 Summary(pl.UTF-8):	Generator wrapperów dla ctypes napisany w czystym Pythonie
 Name:		python-%{module}
 Version:	1.0.2
-Release:	6
+Release:	7
 License:	BSD
 Group:		Libraries/Python
 # only wheels on https://pypi.org/simple/ctypesgen so get from github
@@ -18,22 +16,12 @@ Source0:	https://github.com/davidjamesca/ctypesgen/archive/ctypesgen-%{version}/
 # Source0-md5:	0928ef10a1f0323a82d55d6a0dfac8ff
 Patch0:		%{name}-x32.patch
 URL:		https://github.com/davidjamesca/ctypesgen
-%if %{with python2}
 BuildRequires:	python >= 1:2.3
 BuildRequires:	python-modules >= 1:2.3
 BuildRequires:	python-setuptools
 %if %{with tests}
 BuildRequires:	python-pytest
 %endif
-%endif
-%if %{with python3}
-BuildRequires:	python3 >= 1:3.2
-BuildRequires:	python3-modules >= 1:3.2
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-pytest
-%endif
-%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildArch:	noarch
@@ -47,25 +35,11 @@ written in C.
 Ten program automatycznie generuje wrappery ctypes dla plików
 nagłówkowych w C.
 
-%package -n python3-%{module}
-Summary:	A pure-python wrapper generator for ctypes
-Summary(pl.UTF-8):	Generator wrapperów dla ctypes napisany w czystym Pythonie
-Group:		Libraries/Python
-
-%description -n python3-%{module}
-This project automatically generates ctypes wrappers for header files
-written in C.
-
-%description -n python3-%{module} -l pl.UTF-8
-Ten program automatycznie generuje wrappery ctypes dla plików
-nagłówkowych w C.
-
 %prep
 %setup -q -n %{module}-%{module}-%{version}
 %patch -P 0 -p1
 
 %build
-%if %{with python2}
 %py_build
 
 %if %{with tests}
@@ -74,23 +48,10 @@ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 %endif
 
 find ctypesgen -name '*.py[co]' | xargs %{__rm}
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest -v -x --showlocals ctypesgen/test/testsuite.py
-%endif
-
-find ctypesgen -name '__pycache__' | xargs %{__rm} -r
-%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %py_install
 
 # defaultheader.py and preamble.py are templates not modules, so .py files
@@ -104,33 +65,13 @@ rm -rf $RPM_BUILD_ROOT
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/ctypesgen{,-2}
 
 find ctypesgen -name '*.py[co]' | xargs %{__rm}
-%endif
-
-%if %{with python3}
-%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/ctypesgen/test
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/ctypesgen{,-3}
-ln -s ctypesgen-3 $RPM_BUILD_ROOT%{_bindir}/ctypesgen
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README.md todo.txt
 %attr(755,root,root) %{_bindir}/ctypesgen-2
 %{py_sitescriptdir}/ctypesgen
 %{py_sitescriptdir}/ctypesgen-0.0.0-py*.egg-info
-%endif
-
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc LICENSE README.md todo.txt
-%attr(755,root,root) %{_bindir}/ctypesgen
-%attr(755,root,root) %{_bindir}/ctypesgen-3
-%{py3_sitescriptdir}/ctypesgen
-%{py3_sitescriptdir}/ctypesgen-0.0.0-py*.egg-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-ctypesgen.git/commitdiff/090f7602ec15faaacc47509b1f24e230dae3c0a6



More information about the pld-cvs-commit mailing list