diff -Nru pycxx-6.2.4/build-all.cmd pycxx-6.2.5/build-all.cmd --- pycxx-6.2.4/build-all.cmd 2012-01-14 12:08:11.000000000 +0000 +++ pycxx-6.2.5/build-all.cmd 2013-08-18 14:27:04.000000000 +0000 @@ -1,9 +1,15 @@ setlocal call setup-msvc90 c:\python27.win32\python setup_makefile.py win32 win32.mak -nmake -f win32.mak clean all +nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python27-build.log +nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python27-test.log c:\python32.win32\python setup_makefile.py win32 win32.mak -nmake -f win32.mak clean all +nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python32-build.log +nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python32-test.log + +c:\python33.win32\python setup_makefile.py win32 win32.mak +nmake -f win32.mak clean all 2>&1 | c:\unxutils\tee tmp-python33-build.log +nmake -f win32.mak test 2>&1 | c:\unxutils\tee tmp-python33-test.log endlocal diff -Nru pycxx-6.2.4/build-all.sh pycxx-6.2.5/build-all.sh --- pycxx-6.2.4/build-all.sh 2012-01-14 12:16:46.000000000 +0000 +++ pycxx-6.2.5/build-all.sh 2013-06-18 18:36:18.000000000 +0000 @@ -7,8 +7,8 @@ python2.5 \ python2.6 \ python2.7 \ - python3.1 \ python3.2 \ + python3.3 \ ; do if which $PYTHON >/dev/null diff -Nru pycxx-6.2.4/CXX/Python3/ExtensionTypeBase.hxx pycxx-6.2.5/CXX/Python3/ExtensionTypeBase.hxx --- pycxx-6.2.4/CXX/Python3/ExtensionTypeBase.hxx 2010-03-28 14:54:40.000000000 +0000 +++ pycxx-6.2.5/CXX/Python3/ExtensionTypeBase.hxx 2013-06-18 18:40:36.000000000 +0000 @@ -121,7 +121,8 @@ virtual Object number_power( const Object &, const Object & ); // Buffer - // QQQ need to add py3 interface + virtual int buffer_get( Py_buffer *, int flags ); + virtual int buffer_release( Py_buffer *buf ); public: // helper functions to call function fn_name with 0 to 9 args diff -Nru pycxx-6.2.4/CXX/Version.hxx pycxx-6.2.5/CXX/Version.hxx --- pycxx-6.2.4/CXX/Version.hxx 2011-03-21 20:49:12.000000000 +0000 +++ pycxx-6.2.5/CXX/Version.hxx 2013-08-18 14:51:19.000000000 +0000 @@ -40,7 +40,7 @@ #define PYCXX_VERSION_MAJOR 6 #define PYCXX_VERSION_MINOR 2 -#define PYCXX_VERSION_PATCH 4 +#define PYCXX_VERSION_PATCH 5 #define PYCXX_MAKEVERSION( major, minor, patch ) ((major<<16)|(minor<<8)|(patch)) #define PYCXX_VERSION PYCXX_MAKEVERSION( PYCXX_VERSION_MAJOR, PYCXX_VERSION_MINOR, PYCXX_VERSION_PATCH ) #endif diff -Nru pycxx-6.2.4/CXX/WrapPython.h pycxx-6.2.5/CXX/WrapPython.h --- pycxx-6.2.4/CXX/WrapPython.h 2009-07-19 15:16:47.000000000 +0000 +++ pycxx-6.2.5/CXX/WrapPython.h 2012-06-24 13:18:18.000000000 +0000 @@ -57,4 +57,15 @@ // pull in python definitions #include +// fix issue with Python assuming that isspace, toupper etc are macros +#if defined(isspace) +#undef isspace +#undef isupper +#undef islower +#undef isalnum +#undef isalpha +#undef toupper +#undef tolower +#endif + #endif diff -Nru pycxx-6.2.4/debian/changelog pycxx-6.2.5/debian/changelog --- pycxx-6.2.4/debian/changelog 2014-02-05 19:51:44.000000000 +0000 +++ pycxx-6.2.5/debian/changelog 2014-03-27 23:28:12.000000000 +0000 @@ -1,15 +1,29 @@ -pycxx (6.2.4-5ubuntu2) trusty; urgency=medium +pycxx (6.2.5-1ubuntu2) trusty; urgency=medium - * Fix autopkg test failure with python 3.4. - See http://sourceforge.net/p/cxx/bugs/39/. + * Rebuild with a fixed pkgbinarymangler to get correct doc symlinks. - -- Matthias Klose Wed, 05 Feb 2014 20:50:57 +0100 + -- Adam Conrad Thu, 27 Mar 2014 17:27:56 -0600 -pycxx (6.2.4-5ubuntu1) trusty; urgency=medium +pycxx (6.2.5-1ubuntu1) trusty; urgency=medium - * No change rebuild to add python3.4 support. + * Dereference symlinks when copying the examples into the test directory, so + that they exist when the autopkgtest tries to run them. - -- Matthias Klose Sat, 25 Jan 2014 08:14:34 +0100 + -- Iain Lane Thu, 27 Mar 2014 22:35:57 +0000 + +pycxx (6.2.5-1) unstable; urgency=medium + + * New upstream release (Closes: #739879) + - drop upstream applied 02_fix_indentation.patch + - add fix-version.patch to fix setup.py version number + - fix-example-crash.patch: fix crash of example with python3.4-dbg + * additionally install sources into a folder independent of the python + version and provide PyCXX.pc to export its location + * add README.Debian documenting a way to use pycxx (Closes: #732120) + * debian/rules: clean to allow build twice in a row (Closes: #671415) + * Bump standard version to 3.9.5, no changes required + + -- Julian Taylor Sun, 09 Mar 2014 14:48:16 +0100 pycxx (6.2.4-5) unstable; urgency=low diff -Nru pycxx-6.2.4/debian/control pycxx-6.2.5/debian/control --- pycxx-6.2.4/debian/control 2013-08-02 19:06:52.000000000 +0000 +++ pycxx-6.2.5/debian/control 2014-03-27 22:36:45.000000000 +0000 @@ -1,15 +1,16 @@ Source: pycxx Section: python Priority: optional -Maintainer: Debian Python Modules Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Modules Team Uploaders: Julian Taylor Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), - python3-all-dbg, - python3-all-dev (>= 3.1.2-10~) + python3-all, + python3-all-dbg X-Python-Version: >= 2.4 X-Python3-Version: >= 3.0 -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: http://cxx.sourceforge.net Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/pycxx/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/pycxx/trunk/ @@ -18,6 +19,7 @@ Package: python-cxx-dev Architecture: all Depends: python-dev, ${misc:Depends}, ${python:Depends} +Suggests: pkg-config Description: Set of facilities to extend Python with C++ PyCXX is a set of C++ facilities to make it easier to write Python3 extensions. The main advantage is that it greatly increases the @@ -29,7 +31,8 @@ Package: python3-cxx-dev Architecture: all -Depends: python3-dev, ${misc:Depends}, ${python3:Depends} +Depends: python-cxx-dev, python3-dev, ${misc:Depends}, ${python3:Depends} +Suggests: pkg-config Description: Set of facilities to extend Python3 with C++ PyCXX is a set of C++ facilities to make it easier to write Python3 extensions. The main advantage is that it greatly increases the diff -Nru pycxx-6.2.4/debian/patches/01_change_include_paths.patch pycxx-6.2.5/debian/patches/01_change_include_paths.patch --- pycxx-6.2.4/debian/patches/01_change_include_paths.patch 2012-03-04 18:48:20.000000000 +0000 +++ pycxx-6.2.5/debian/patches/01_change_include_paths.patch 2014-03-09 16:14:56.000000000 +0000 @@ -1,8 +1,6 @@ Description: fix includes to match packaged layout Forwarded: not-needed -diff --git a/Src/cxxextensions.c b/Src/cxxextensions.c -index 28a8e1d..cfab556 100644 --- a/Src/cxxextensions.c +++ b/Src/cxxextensions.c @@ -37,7 +37,7 @@ @@ -15,8 +13,6 @@ -#include "Src/Python3/cxxextensions.c" +#include "Python3/cxxextensions.c" #endif -diff --git a/Src/cxxsupport.cxx b/Src/cxxsupport.cxx -index 1f2fb43..946e60d 100644 --- a/Src/cxxsupport.cxx +++ b/Src/cxxsupport.cxx @@ -37,7 +37,7 @@ diff -Nru pycxx-6.2.4/debian/patches/02_fix_indentation.patch pycxx-6.2.5/debian/patches/02_fix_indentation.patch --- pycxx-6.2.4/debian/patches/02_fix_indentation.patch 2012-03-04 18:48:20.000000000 +0000 +++ pycxx-6.2.5/debian/patches/02_fix_indentation.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -Description: fix indentation and version number -Bug: http://sourceforge.net/tracker/?func=detail&aid=3207845&group_id=3180&atid=103180 - -diff --git a/setup.py b/setup.py -index ef82cf5..016aa7e 100755 ---- a/setup.py -+++ b/setup.py -@@ -12,18 +12,18 @@ sources = (glob( os.path.join( "Src", "*.cxx" ) ) - class my_install (install): - - def finalize_options (self): -- if not self.install_data or (len(self.install_data) < 8) : -- self.install_data = "$base/share/python$py_version_short" -+ if not self.install_data or (len(self.install_data) < 8): -+ self.install_data = "$base/share/python$py_version_short" - install.finalize_options (self) - - def run (self): -- self.distribution.data_files = [("CXX", sources)] -- self.distribution.headers = headers -+ self.distribution.data_files = [("CXX", sources)] -+ self.distribution.headers = headers - install.run (self) - - - setup (name = "CXX", -- version = "6.2.0", -+ version = "6.2.4", - maintainer = "Barry Scott", - maintainer_email = "barry-scott@users.sourceforge.net", - description = "Facility for extending Python with C++", diff -Nru pycxx-6.2.4/debian/patches/fix-example-crash.patch pycxx-6.2.5/debian/patches/fix-example-crash.patch --- pycxx-6.2.4/debian/patches/fix-example-crash.patch 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-6.2.5/debian/patches/fix-example-crash.patch 2014-03-09 16:14:56.000000000 +0000 @@ -0,0 +1,28 @@ +Description: fix assert with pytohn3.4-dbg + python3.4-dbg asserts on capi usage that can fail with an error set +Bug: https://sourceforge.net/p/cxx/bugs/39/ + +--- a/Demo/Python3/example.cxx ++++ b/Demo/Python3/example.cxx +@@ -124,8 +124,6 @@ void test_String() + + void test_boolean() + { +- bool passed = true; +- + Py::Object o; + Py::Boolean pb1; + Py::Boolean pb2; +@@ -783,10 +781,11 @@ private: + } + catch( Py::TypeError &e ) + { ++ e.clear(); ++ + std::cout << "PASSED: Correctly caught " << Py::type(e) << std::endl; + std::cout << "PASSED: Py::Exception value: " << Py::value(e) << std::endl; + std::cout << "PASSED: Py::Exception traceback: " << Py::trace(e) << std::endl; +- e.clear(); + } + + try diff -Nru pycxx-6.2.4/debian/patches/fix-version.patch pycxx-6.2.5/debian/patches/fix-version.patch --- pycxx-6.2.4/debian/patches/fix-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-6.2.5/debian/patches/fix-version.patch 2014-03-09 16:14:56.000000000 +0000 @@ -0,0 +1,14 @@ +Description: fix indentation and version number +Bug: http://sourceforge.net/tracker/?func=detail&aid=3207845&group_id=3180&atid=103180 + +--- a/setup.py ++++ b/setup.py +@@ -23,7 +23,7 @@ class my_install (install): + + + setup (name = "CXX", +- version = "6.2.4", ++ version = "6.2.5", + maintainer = "Barry Scott", + maintainer_email = "barry-scott@users.sourceforge.net", + description = "Facility for extending Python with C++", diff -Nru pycxx-6.2.4/debian/patches/py3.4-examples.diff pycxx-6.2.5/debian/patches/py3.4-examples.diff --- pycxx-6.2.4/debian/patches/py3.4-examples.diff 2014-02-05 19:50:34.000000000 +0000 +++ pycxx-6.2.5/debian/patches/py3.4-examples.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Index: b/Demo/Python3/example.cxx -=================================================================== ---- a/Demo/Python3/example.cxx -+++ b/Demo/Python3/example.cxx -@@ -783,10 +783,10 @@ - } - catch( Py::TypeError &e ) - { -+ e.clear(); - std::cout << "PASSED: Correctly caught " << Py::type(e) << std::endl; - std::cout << "PASSED: Py::Exception value: " << Py::value(e) << std::endl; - std::cout << "PASSED: Py::Exception traceback: " << Py::trace(e) << std::endl; -- e.clear(); - } - - try diff -Nru pycxx-6.2.4/debian/patches/series pycxx-6.2.5/debian/patches/series --- pycxx-6.2.4/debian/patches/series 2014-02-05 19:45:47.000000000 +0000 +++ pycxx-6.2.5/debian/patches/series 2014-03-09 16:14:56.000000000 +0000 @@ -1,3 +1,3 @@ 01_change_include_paths.patch -02_fix_indentation.patch -py3.4-examples.diff +fix-version.patch +fix-example-crash.patch diff -Nru pycxx-6.2.4/debian/PyCXX.pc pycxx-6.2.5/debian/PyCXX.pc --- pycxx-6.2.4/debian/PyCXX.pc 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-6.2.5/debian/PyCXX.pc 2014-03-09 16:14:56.000000000 +0000 @@ -0,0 +1,9 @@ +prefix=/usr +exec_prefix=/usr +includedir=/usr/include/CXX +srcdir=/usr/src/CXX + +Name: PyCXX +Description: Write Python extensions in C++ +Version: 6.2.5 +Cflags: -I${includedir} diff -Nru pycxx-6.2.4/debian/README.debian pycxx-6.2.5/debian/README.debian --- pycxx-6.2.4/debian/README.debian 2011-04-15 23:56:22.000000000 +0000 +++ pycxx-6.2.5/debian/README.debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -pycxx for Ubuntu (and Debian) ------------------------------ - -- python[3]-cxx-dev contains the development files to build extensions - using PyCXX. Holds the example files as well. - - -- Matthias Klose , Fri, 3 Dec 2004 17:16:12 +0100 diff -Nru pycxx-6.2.4/debian/README.Debian pycxx-6.2.5/debian/README.Debian --- pycxx-6.2.4/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-6.2.5/debian/README.Debian 2014-03-09 16:14:56.000000000 +0000 @@ -0,0 +1,20 @@ +PyCXX does not offer a shared library, it is intended users of this package +compile the sources into their extensions. +The Debian (and Fedora) package offers a pkg-config file named PyCXX.pc which +exports the installed location of the headers and sources required to build, do +not hardcode the path into your files. + +Example: +Copy /usr/share/doc/python-cxx-dev/examples/ into a writeable area from there +you can compile an example by executing these commands: + +CFLAGS="$(pkg-config --cflags PyCXX) $(python-config --cflags)" +SRC="$(pkg-config --variable=srcdir PyCXX)" + +g++ -fPIC $CFLAGS simple.cxx \ + $SRC/cxxextensions.c $SRC/cxx_extensions.cxx \ + $SRC/cxxsupport.cxx \ + $SRC/IndirectPythonInterface.cxx \ + -shared -o simple.so +python test_simple.py + diff -Nru pycxx-6.2.4/debian/rules pycxx-6.2.5/debian/rules --- pycxx-6.2.4/debian/rules 2013-08-02 19:06:52.000000000 +0000 +++ pycxx-6.2.5/debian/rules 2014-03-09 16:14:56.000000000 +0000 @@ -7,11 +7,23 @@ %: dh $@ --with python2,python3 +override_dh_auto_clean: + rm -rf build + override_dh_auto_build: set -e && for i in $(PYVERS); do $${i} setup.py build; done set -e && for i in $(PY3VERS); do $${i} setup.py build; done override_dh_auto_install: + dh_install -ppython-cxx-dev CXX/*.hxx /usr/include/CXX/; + dh_install -ppython-cxx-dev CXX/*.h /usr/include/CXX/; + dh_install -ppython-cxx-dev CXX/Python2/* /usr/include/CXX/Python2; + dh_install -ppython3-cxx-dev CXX/Python3/* /usr/include/CXX/Python3; + dh_install -ppython-cxx-dev Src/*.c /usr/src/CXX/; + dh_install -ppython-cxx-dev Src/*.cxx /usr/src/CXX/; + dh_install -ppython-cxx-dev Src/Python2/* /usr/src/CXX/Python2; + dh_install -ppython3-cxx-dev Src/Python3/* /usr/src/CXX/Python3; + dh_install debian/PyCXX.pc /usr/lib/pkgconfig/ #should symlink to a common folder, but dh_link takes no wildcards # and replacing folders symlinks in upgrades is problematic (policy 6.5) # => wasting a little space preferable to more complex logic @@ -28,7 +40,7 @@ dh_install -ppython-cxx-dev usr/lib/python2*/dist-packages/CXX/__init__.py; \ done set -e && for i in $(PY3VERS); do \ - $${i} setup.py install --force --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb; \ + $${i} setup.py install --force --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb; \ 2to3 -w -n $(CURDIR)/debian/tmp/usr/lib; \ python_inc_dir=$$(readlink -f /usr/include/$$i); \ abitag=$$($${i}-dbg -c "import sys; print(sys.abiflags)"); \ @@ -44,6 +56,9 @@ done dh_auto_install +override_dh_installdocs: + dh_installdocs -A debian/README.Debian + override_dh_fixperms: chmod 644 $(CURDIR)/debian/python*-cxx-dev/usr/share/doc/python*-cxx-dev/examples/* dh_fixperms diff -Nru pycxx-6.2.4/debian/tests/buildtest pycxx-6.2.5/debian/tests/buildtest --- pycxx-6.2.4/debian/tests/buildtest 2013-08-02 19:06:52.000000000 +0000 +++ pycxx-6.2.5/debian/tests/buildtest 2014-03-27 22:36:37.000000000 +0000 @@ -6,10 +6,11 @@ cd $ADTTMP -cp -r /usr/share/doc/python-cxx-dev/examples/ . +cp -Lr /usr/share/doc/python-cxx-dev/examples/ . cd examples for py in $pys; do + export PYTHONPATH=$PWD/local/lib/$py/site-packages/CXX $py setup.py build 2>&1 $py setup.py install --prefix=$PWD/local 2>&1 @@ -17,10 +18,20 @@ $py-dbg setup.py build 2>&1 $py-dbg setup.py install --prefix=$PWD/local 2>&1 $py-dbg test_example.py 2>&1 + + # matplotlib install method + rm -rf $PYTHONPATH + $py -c "import CXX" 2>&1 + CFLAGS="$(pkg-config --cflags PyCXX) $($py-config --cflags)" + SRC="$(pkg-config --variable=srcdir PyCXX)" + + g++ -fPIC $CFLAGS simple.cxx $SRC/cxxextensions.c $SRC/cxx_extensions.cxx $SRC/cxxsupport.cxx \ + $SRC/IndirectPythonInterface.cxx -shared -o simple.so 2>&1 + $py test_simple.py 2>&1 done cd .. -cp -r /usr/share/doc/python3-cxx-dev/examples/ . +cp -Lr /usr/share/doc/python3-cxx-dev/examples/ . cd examples for py in $py3s; do @@ -31,5 +42,14 @@ $py-dbg setup.py build 2>&1 $py-dbg setup.py install --prefix=$PWD/local 2>&1 $py-dbg test_example.py 2>&1 -done + rm -rf $PYTHONPATH + # matplotlib install method + $py -c "import CXX" 2>&1 + CFLAGS="$(pkg-config --cflags PyCXX) $($py-config --cflags)" + SRC="$(pkg-config --variable=srcdir PyCXX)" + + g++ -fPIC $CFLAGS simple.cxx $SRC/cxxextensions.c $SRC/cxx_extensions.cxx $SRC/cxxsupport.cxx \ + $SRC/IndirectPythonInterface.cxx -shared -o simple.so 2>&1 + $py test_simple.py 2>&1 +done diff -Nru pycxx-6.2.4/debian/tests/control pycxx-6.2.5/debian/tests/control --- pycxx-6.2.4/debian/tests/control 2013-08-02 19:06:52.000000000 +0000 +++ pycxx-6.2.5/debian/tests/control 2014-03-09 16:14:56.000000000 +0000 @@ -1,2 +1,2 @@ Tests: buildtest -Depends: python-cxx-dev, python3-cxx-dev, g++, python-all-dev, python3-all-dev, python-all-dbg, python3-all-dbg +Depends: pkg-config, build-essential, python-cxx-dev, python3-cxx-dev, python-all-dev, python3-all-dev, python-all-dbg, python3-all-dbg diff -Nru pycxx-6.2.4/how_to_release_pycxx.txt pycxx-6.2.5/how_to_release_pycxx.txt --- pycxx-6.2.4/how_to_release_pycxx.txt 2010-12-26 16:25:54.000000000 +0000 +++ pycxx-6.2.5/how_to_release_pycxx.txt 2012-03-03 23:13:44.000000000 +0000 @@ -11,7 +11,7 @@ 3. Select File 4. Create New Folder 5. Name the Folder PyCXX V.. e.g. PyCXX V6.1.1 - 7. Upload the source kit and its PyCXX-Release-Notes-readme.txt + 7. Upload the source kit and its PyCXX-Release-Notes-readme.txt (as README.txt) 9. Click on the source kit (i) icon and choose Select All platforms 4. Add news about release 1. Click Develop diff -Nru pycxx-6.2.4/README.html pycxx-6.2.5/README.html --- pycxx-6.2.4/README.html 2012-03-03 21:40:33.000000000 +0000 +++ pycxx-6.2.5/README.html 2013-04-24 18:16:28.000000000 +0000 @@ -1,5 +1,4 @@ - PyCXX README diff -Nru pycxx-6.2.4/setup.py pycxx-6.2.5/setup.py --- pycxx-6.2.4/setup.py 2010-05-02 19:10:27.000000000 +0000 +++ pycxx-6.2.5/setup.py 2013-06-18 18:20:30.000000000 +0000 @@ -12,18 +12,18 @@ class my_install (install): def finalize_options (self): - if not self.install_data or (len(self.install_data) < 8) : - self.install_data = "$base/share/python$py_version_short" + if not self.install_data or (len(self.install_data) < 8) : + self.install_data = "$base/share/python$py_version_short" install.finalize_options (self) def run (self): - self.distribution.data_files = [("CXX", sources)] - self.distribution.headers = headers + self.distribution.data_files = [("CXX", sources)] + self.distribution.headers = headers install.run (self) setup (name = "CXX", - version = "6.2.0", + version = "6.2.4", maintainer = "Barry Scott", maintainer_email = "barry-scott@users.sourceforge.net", description = "Facility for extending Python with C++", diff -Nru pycxx-6.2.4/SourceForge/index.html pycxx-6.2.5/SourceForge/index.html --- pycxx-6.2.4/SourceForge/index.html 2011-02-06 12:51:38.000000000 +0000 +++ pycxx-6.2.5/SourceForge/index.html 2013-08-18 14:51:19.000000000 +0000 @@ -52,7 +52,18 @@

Latest PyCXX README file.


-

Version 6.2.3 (6-Feb-2011)

+

Version 6.2.5 (18-Aug-2013)

+

Fix build issue with GCC 4.2.1 on FreeBSD and Mac OS X (stop python defining isspace as a macro).

+

Remove support for python 3.1 (API's are unstable).

+

Add Python 3.3 support.

+

Patch frm Michael Droettboom to fix compilation issues.

+

Patch frm Michael Droettboom to add buffer interface for python3.

+ +

Version 6.2.4 (3-Mar-2012)

+

Fix memory leak in string encode and decode functions

+

Fix indirect python loading on windows - Bool_type was missing

+ +

Version 6.2.3 (11-mar-2011)

Fix memory leak in string encode and decode functions

Fix indirect python loading on windows - Bool_type was missing

diff -Nru pycxx-6.2.4/Src/Python2/cxx_extensions.cxx pycxx-6.2.5/Src/Python2/cxx_extensions.cxx --- pycxx-6.2.4/Src/Python2/cxx_extensions.cxx 2012-02-26 14:32:54.000000000 +0000 +++ pycxx-6.2.5/Src/Python2/cxx_extensions.cxx 2013-06-18 18:37:15.000000000 +0000 @@ -261,7 +261,9 @@ static int setattr_handler( PyObject *, char *, PyObject * ); static PyObject *getattro_handler( PyObject *, PyObject * ); static int setattro_handler( PyObject *, PyObject *, PyObject * ); +#if defined( PYCXX_PYTHON_2TO3 ) static int compare_handler( PyObject *, PyObject * ); +#endif static PyObject *rich_compare_handler( PyObject *, PyObject *, int ); static PyObject *repr_handler( PyObject * ); static PyObject *str_handler( PyObject * ); @@ -723,6 +725,7 @@ } } +#if defined( PYCXX_PYTHON_2TO3 ) extern "C" int compare_handler( PyObject *self, PyObject *other ) { try @@ -735,6 +738,7 @@ return -1; // indicate error } } +#endif #if PY_MAJOR_VERSION > 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 1) extern "C" PyObject *rich_compare_handler( PyObject *self, PyObject *other, int op ) diff -Nru pycxx-6.2.4/Src/Python3/cxx_extensions.cxx pycxx-6.2.5/Src/Python3/cxx_extensions.cxx --- pycxx-6.2.4/Src/Python3/cxx_extensions.cxx 2012-02-26 14:32:54.000000000 +0000 +++ pycxx-6.2.5/Src/Python3/cxx_extensions.cxx 2013-06-18 18:40:36.000000000 +0000 @@ -262,7 +262,8 @@ static PyObject *number_power_handler( PyObject *, PyObject *, PyObject * ); // Buffer - // QQQ + static int buffer_get_handler( PyObject *, Py_buffer *, int ); + static void buffer_release_handler( PyObject *, Py_buffer * ); } extern "C" void standard_dealloc( PyObject *p ) @@ -345,8 +346,8 @@ buffer_table = new PyBufferProcs; memset( buffer_table, 0, sizeof( PyBufferProcs ) ); // ensure new fields are 0 table->tp_as_buffer = buffer_table; - // QQQ bf_getbuffer - // QQQ bf_releasebuffer + buffer_table->bf_getbuffer = buffer_get_handler; + buffer_table->bf_releasebuffer = buffer_release_handler; } return *this; } @@ -1099,6 +1100,25 @@ } // Buffer +extern "C" int buffer_get_handler( PyObject *self, Py_buffer *buf, int flags ) +{ + try + { + PythonExtensionBase *p = getPythonExtensionBase( self ); + return p->buffer_get( buf, flags ); + } + catch( Py::Exception & ) + { + return -1; // indicate error + } +} + +extern "C" void buffer_release_handler( PyObject *self, Py_buffer *buf ) +{ + PythonExtensionBase *p = getPythonExtensionBase( self ); + p->buffer_release( buf ); + // NOTE: No way to indicate error to Python +} //================================================================================ // @@ -1454,7 +1474,18 @@ // Buffer -// QQQ +int PythonExtensionBase::buffer_get( Py_buffer *buf, int flags ) +{ + missing_method( buffer_get ); + return -1; +} + +int PythonExtensionBase::buffer_release( Py_buffer *buf ) +{ + /* This method is optional and only required if the buffer's + memory is dynamic. */ + return 0; +} //-------------------------------------------------------------------------------- // diff -Nru pycxx-6.2.4/tag_pycxx.py pycxx-6.2.5/tag_pycxx.py --- pycxx-6.2.4/tag_pycxx.py 2010-08-15 17:20:10.000000000 +0000 +++ pycxx-6.2.5/tag_pycxx.py 2013-08-18 09:42:10.000000000 +0000 @@ -64,8 +64,8 @@ return version = sys.argv[1] - from_url = 'https://cxx.svn.sourceforge.net/svnroot/cxx/trunk/CXX' - tag_base_url = 'https://cxx.svn.sourceforge.net/svnroot/cxx/tags' + from_url = 'https://svn.code.sf.net/p/cxx/code/trunk/CXX' + tag_base_url = 'https://svn.code.sf.net/p/cxx/code/tags' make_tag( from_url, tag_base_url, version )