[packages/PyCXX] - up to 7.1.7, install like the authors say
baggins
baggins at pld-linux.org
Sun Dec 15 11:46:14 CET 2024
commit a1466513bda65a5c186505a621925fd9dfbbf956
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Dec 15 10:43:31 2024 +0100
- up to 7.1.7, install like the authors say
PyCXX-memleak_fix.patch | 48 ------------------------------------------------
PyCXX.spec | 22 ++++++++--------------
2 files changed, 8 insertions(+), 62 deletions(-)
---
diff --git a/PyCXX.spec b/PyCXX.spec
index 810ea32..12de1d1 100644
--- a/PyCXX.spec
+++ b/PyCXX.spec
@@ -1,17 +1,13 @@
-# TODO: Find out authors idea behind installing it properly and try implement it
-# Propably it shoud be library thus not marked as noarch.
-
Summary: Set of classes to help create extensions of Python in the C++ language
Summary(pl.UTF-8): Klasy C++ pomocne przy tworzeniu modułów Pythona
Name: PyCXX
-Version: 6.2.3
-Release: 3
+Version: 7.1.7
+Release: 1
License: BSD
Group: Development/Libraries
# http://prdownloads.sourceforge.net/cxx/pycxx-6.2.3.tar.gz
Source0: http://downloads.sourceforge.net/cxx/pycxx-%{version}.tar.gz
-# Source0-md5: 4e545ad225df9c14a3b344b1e6224661
-Patch0: %{name}-memleak_fix.patch
+# Source0-md5: b145c3444f66e129fc2fac9924855439
URL: http://cxx.sourceforge.net/
BuildRequires: python-modules
Requires: libstdc++-devel
@@ -32,22 +28,20 @@ modułów rozszerzeń Pythona.
%prep
%setup -q -n pycxx-%{version}
-%patch -P 0 -p1
%build
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}/
-cp -r CXX $RPM_BUILD_ROOT%{_includedir}/
-install -d $RPM_BUILD_ROOT%{_includedir}/CXX/Src
-install Src/IndirectPythonInterface.cxx $RPM_BUILD_ROOT%{_includedir}/CXX/Src
-install Src/Python2/* $RPM_BUILD_ROOT%{_includedir}/CXX/Src
+%py3_install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%{_includedir}/CXX
+%{_includedir}/python3.10/CXX
+%{_datadir}/python3.10/CXX
+%{py3_sitescriptdir}/CXX-%{version}-py*.egg-info
+%{py3_sitescriptdir}/CXX
diff --git a/PyCXX-memleak_fix.patch b/PyCXX-memleak_fix.patch
deleted file mode 100644
index 86d7d41..0000000
--- a/PyCXX-memleak_fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- ./CXX/Python2/ExtensionOldType.hxx-memleak_fix 2011-07-26 17:32:57.230429675 +0200
-+++ ./CXX/Python2/ExtensionOldType.hxx 2011-07-26 17:34:05.384066472 +0200
-@@ -178,7 +178,7 @@ namespace Py
- Tuple self( 2 );
-
- self[0] = Object( this );
-- self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
-+ self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
-
- PyObject *func = PyCFunction_New( &method_def->ext_meth_def, self.ptr() );
-
---- ./CXX/Python2/ExtensionModule.hxx-memleak_fix 2011-07-26 17:34:21.287470428 +0200
-+++ ./CXX/Python2/ExtensionModule.hxx 2011-07-26 17:35:49.331193448 +0200
-@@ -139,8 +139,8 @@ namespace Py
- static PyObject *self = PyCObject_FromVoidPtr( this, do_not_dealloc );
-
- Tuple args( 2 );
-- args[0] = Object( self );
-- args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
-+ args[0] = Object( self, true );
-+ args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
-
- PyObject *func = PyCFunction_New
- (
---- ./CXX/Python3/ExtensionModule.hxx.memleak_fix 2011-07-26 18:55:45.910115406 +0200
-+++ ./CXX/Python3/ExtensionModule.hxx 2011-07-26 18:56:55.327162541 +0200
-@@ -137,8 +137,8 @@ namespace Py
- static PyObject *self = PyCObject_FromVoidPtr( this, do_not_dealloc );
-
- Tuple args( 2 );
-- args[0] = Object( self );
-- args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
-+ args[0] = Object( self, true );
-+ args[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
-
- PyObject *func = PyCFunction_New
- (
---- ./CXX/Python3/ExtensionOldType.hxx.memleak_fix 2011-07-26 18:54:39.309749026 +0200
-+++ ./CXX/Python3/ExtensionOldType.hxx 2011-07-26 18:55:25.346669091 +0200
-@@ -178,7 +178,7 @@ namespace Py
- Tuple self( 2 );
-
- self[0] = Object( this );
-- self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ) );
-+ self[1] = Object( PyCObject_FromVoidPtr( method_def, do_not_dealloc ), true );
-
- PyObject *func = PyCFunction_New( &method_def->ext_meth_def, self.ptr() );
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/PyCXX.git/commitdiff/a1466513bda65a5c186505a621925fd9dfbbf956
More information about the pld-cvs-commit
mailing list