forked from pool/python-pycxx
Accepting request 955482 from devel:languages:python
- update to 7.1.7: * Add support for building against python 3.11 alpha 4. * Replace use of deprecated PyUnicode APIs with the supported version. * Add support for more number methods, like matrix and the inplace versions. * Use IsInstance checking so that derived classes of builtin types can be used. * Add support for python 3.9 beta 1 changes * Fix for memory leak caused by wrong ref count on python3 Py::String objects. * Remove support for supportPrint() etc as the tp_print field is being removed from python either in 3.8 or 3.9. * Fix problem with compiling for Python 2 and the _Py_PackageContext symbol. * Add exception errorType() and errorValue() function to access the type and value of an exception. * Add support for Py_LIMITED_API aka PEP-384 - drop python-pycxx-7.0.3-python37.patch python-pycxx-7.0.3-setup.py.patch (upstream) OBS-URL: https://build.opensuse.org/request/show/955482 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pycxx?expand=0&rev=6
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:33ac7eb5fd41688cb206da89bac1fa06704116e7e632468c69d72b799a138afa
|
|
||||||
size 148813
|
|
3
pycxx-7.1.7.tar.gz
Normal file
3
pycxx-7.1.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a2798ae850460d66cbe59769c6df447ea457a5fd29c516b26a0a9ecadd4bbcb4
|
||||||
|
size 156383
|
@@ -1,48 +0,0 @@
|
|||||||
diff --git a/CXX/Python2/IndirectPythonInterface.hxx b/CXX/Python2/IndirectPythonInterface.hxx
|
|
||||||
index e2ee725..1c7cc24 100644
|
|
||||||
--- a/CXX/Python2/IndirectPythonInterface.hxx
|
|
||||||
+++ b/CXX/Python2/IndirectPythonInterface.hxx
|
|
||||||
@@ -153,7 +153,7 @@ int &_Py_VerboseFlag();
|
|
||||||
void _XINCREF( PyObject *op );
|
|
||||||
void _XDECREF( PyObject *op );
|
|
||||||
|
|
||||||
-char *__Py_PackageContext();
|
|
||||||
+const char *__Py_PackageContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__
|
|
||||||
diff --git a/CXX/Python3/IndirectPythonInterface.hxx b/CXX/Python3/IndirectPythonInterface.hxx
|
|
||||||
index 6163536..9807b2e 100644
|
|
||||||
--- a/CXX/Python3/IndirectPythonInterface.hxx
|
|
||||||
+++ b/CXX/Python3/IndirectPythonInterface.hxx
|
|
||||||
@@ -149,7 +149,7 @@ int &_Py_UnicodeFlag();
|
|
||||||
void _XINCREF( PyObject *op );
|
|
||||||
void _XDECREF( PyObject *op );
|
|
||||||
|
|
||||||
-char *__Py_PackageContext();
|
|
||||||
+const char *__Py_PackageContext();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__
|
|
||||||
diff --git a/Src/IndirectPythonInterface.cxx b/Src/IndirectPythonInterface.cxx
|
|
||||||
index de0ca7f..b7d7d9e 100644
|
|
||||||
--- a/Src/IndirectPythonInterface.cxx
|
|
||||||
+++ b/Src/IndirectPythonInterface.cxx
|
|
||||||
@@ -348,7 +348,7 @@ PyTypeObject *_CObject_Type() { return ptr__CObject_Type; }
|
|
||||||
PyTypeObject *_Bytes_Type() { return ptr__Bytes_Type; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-char *__Py_PackageContext() { return *ptr__Py_PackageContext; }
|
|
||||||
+const char *__Py_PackageContext() { return *ptr__Py_PackageContext; }
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
@@ -468,7 +468,7 @@ int &_Py_InteractiveFlag() { return Py_InteractiveFlag; }
|
|
||||||
int &_Py_OptimizeFlag() { return Py_OptimizeFlag; }
|
|
||||||
int &_Py_NoSiteFlag() { return Py_NoSiteFlag; }
|
|
||||||
int &_Py_VerboseFlag() { return Py_VerboseFlag; }
|
|
||||||
-char *__Py_PackageContext() { return _Py_PackageContext; }
|
|
||||||
+const char *__Py_PackageContext() { return _Py_PackageContext; }
|
|
||||||
|
|
||||||
//
|
|
||||||
// Needed to keep the abstactions for delayload interface
|
|
@@ -1,85 +0,0 @@
|
|||||||
This patch makes several changes to setup.py:
|
|
||||||
|
|
||||||
- Add omitted headers and sources to install
|
|
||||||
- Extend install_headers to handle subdirs
|
|
||||||
- Install only Python v2 or v3 code as appropriate
|
|
||||||
- Update version number
|
|
||||||
- Convert tabs to spaces (from original RPM)
|
|
||||||
- http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
|
|
||||||
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -1,13 +1,31 @@
|
|
||||||
import os, sys
|
|
||||||
from glob import glob
|
|
||||||
from distutils.command.install import install
|
|
||||||
+from distutils.command.install_headers import install_headers
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
-headers = (glob( os.path.join( "CXX","*.hxx" ) )
|
|
||||||
- +glob( os.path.join( "CXX","*.h" ) ))
|
|
||||||
-sources = (glob( os.path.join( "Src", "*.cxx" ) )
|
|
||||||
- +glob( os.path.join( "Src", "*.c" ) ))
|
|
||||||
+# either "Python2" or "Python3"
|
|
||||||
+PythonVer = "Python" + sys.version[0]
|
|
||||||
|
|
||||||
+headers = [
|
|
||||||
+ (None,
|
|
||||||
+ glob(os.path.join("CXX","*.hxx")) + \
|
|
||||||
+ glob(os.path.join("CXX","*.h"))
|
|
||||||
+ ),
|
|
||||||
+ (PythonVer,
|
|
||||||
+ glob(os.path.join("CXX",PythonVer,"*.hxx"))
|
|
||||||
+ )
|
|
||||||
+ ]
|
|
||||||
+
|
|
||||||
+sources = [
|
|
||||||
+ ("CXX",
|
|
||||||
+ glob(os.path.join("Src", "*.cxx")) + \
|
|
||||||
+ glob(os.path.join("Src", "*.c"))
|
|
||||||
+ ),
|
|
||||||
+ (os.path.join("CXX",PythonVer),
|
|
||||||
+ glob(os.path.join("Src",PythonVer,"*"))
|
|
||||||
+ )
|
|
||||||
+ ]
|
|
||||||
|
|
||||||
class my_install (install):
|
|
||||||
|
|
||||||
@@ -17,10 +35,26 @@ class my_install (install):
|
|
||||||
install.finalize_options (self)
|
|
||||||
|
|
||||||
def run (self):
|
|
||||||
- self.distribution.data_files = [("CXX", sources)]
|
|
||||||
+ self.distribution.data_files = sources
|
|
||||||
self.distribution.headers = headers
|
|
||||||
install.run (self)
|
|
||||||
|
|
||||||
+class my_install_headers (install_headers):
|
|
||||||
+ def run (self):
|
|
||||||
+ if not self.distribution.headers:
|
|
||||||
+ return
|
|
||||||
+
|
|
||||||
+ for subdir, headers in self.distribution.headers:
|
|
||||||
+ try:
|
|
||||||
+ dir = os.path.join(self.install_dir,subdir)
|
|
||||||
+ except:
|
|
||||||
+ dir = self.install_dir
|
|
||||||
+ self.mkpath(dir)
|
|
||||||
+ for header in headers:
|
|
||||||
+ (out, _) = self.copy_file(header, dir)
|
|
||||||
+ self.outfiles.append(out)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
# read the version from the master file CXX/Version.hxx
|
|
||||||
v_maj = None
|
|
||||||
v_min = None
|
|
||||||
@@ -43,7 +77,8 @@ setup (name = "CXX",
|
|
||||||
description = "Facility for extending Python with C++",
|
|
||||||
url = "http://cxx.sourceforge.net",
|
|
||||||
|
|
||||||
- cmdclass = {'install': my_install},
|
|
||||||
+ cmdclass = {'install': my_install,
|
|
||||||
+ 'install_headers': my_install_headers},
|
|
||||||
packages = ['CXX'],
|
|
||||||
package_dir = {'CXX': 'Lib'}
|
|
||||||
)
|
|
@@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 16 20:21:38 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 7.1.7:
|
||||||
|
* Add support for building against python 3.11 alpha 4.
|
||||||
|
* Replace use of deprecated PyUnicode APIs with the supported version.
|
||||||
|
* Add support for more number methods, like matrix and the inplace versions.
|
||||||
|
* Use IsInstance checking so that derived classes of builtin types can be used.
|
||||||
|
* Add support for python 3.9 beta 1 changes
|
||||||
|
* Fix for memory leak caused by wrong ref count on python3 Py::String objects.
|
||||||
|
* Remove support for supportPrint() etc as the tp_print field is being removed
|
||||||
|
from python either in 3.8 or 3.9.
|
||||||
|
* Fix problem with compiling for Python 2 and the _Py_PackageContext symbol.
|
||||||
|
* Add exception errorType() and errorValue() function to access the type and
|
||||||
|
value of an exception.
|
||||||
|
* Add support for Py_LIMITED_API aka PEP-384
|
||||||
|
- drop python-pycxx-7.0.3-python37.patch python-pycxx-7.0.3-setup.py.patch (upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 22 14:51:18 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
Mon Feb 22 14:51:18 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pycxx
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -22,16 +22,14 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 7.0.3
|
Version: 7.1.7
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python extensions in C++
|
Summary: Python extensions in C++
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
URL: http://CXX.sourceforge.net/
|
URL: http://CXX.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/cxx/%{modname}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/cxx/%{modname}-%{version}.tar.gz
|
||||||
Patch0: python-pycxx-7.0.3-python37.patch
|
|
||||||
Patch1: python-pycxx-7.0.3-change-include-paths.patch
|
Patch1: python-pycxx-7.0.3-change-include-paths.patch
|
||||||
Patch2: python-pycxx-7.0.3-setup.py.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
Reference in New Issue
Block a user