diff -Nru pycxx-7.1.4/build-all.cmd pycxx-7.1.7/build-all.cmd --- pycxx-7.1.4/build-all.cmd 2019-02-18 14:03:52.000000000 +0000 +++ pycxx-7.1.7/build-all.cmd 2021-02-07 09:52:55.000000000 +0000 @@ -1,48 +1 @@ -if not "%1%2" == "" goto :build_%1_%2 - -:build_27_32 - call build-unlimited-api.cmd 27 win32 9.0 -if not "%1%2" == "" goto :eof - -:build_33_32 - call build-unlimited-api.cmd 33 win32 10.0 -if not "%1%2" == "" goto :eof - -:build_34_32 - call build-unlimited-api.cmd 34 win32 10.0 - call build-limited-api.cmd 34 win32 10.0 3.4 -if not "%1%2" == "" goto :eof - -:build_35_32 - call build-unlimited-api.cmd 35 win32 14.0 - call build-limited-api.cmd 35 win32 14.0 3.4 - call build-limited-api.cmd 35 win32 14.0 3.5 -if not "%1%2" == "" goto :eof - -:build_27_64 - call build-unlimited-api.cmd 27 win64 9.0 -if not "%1%2" == "" goto :eof - -:build_35_64 - call build-unlimited-api.cmd 35 win64 14.0 - call build-limited-api.cmd 35 win64 14.0 3.4 - call build-limited-api.cmd 35 win64 14.0 3.5 -if not "%1%2" == "" goto :eof - -:build_36_64 - call build-unlimited-api.cmd 36 win64 14.0 - call build-limited-api.cmd 36 win64 14.0 3.4 - call build-limited-api.cmd 36 win64 14.0 3.6 -if not "%1%2" == "" goto :eof - -:build_37_64 - call build-unlimited-api.cmd 37 win64 14.0 - call build-limited-api.cmd 37 win64 14.0 3.4 - call build-limited-api.cmd 37 win64 14.0 3.7 -if not "%1%2" == "" goto :eof - -:build_38_64 - call build-unlimited-api.cmd 38 win64 14.0 - call build-limited-api.cmd 38 win64 14.0 3.4 - call build-limited-api.cmd 38 win64 14.0 3.7 -if not "%1%2" == "" goto :eof +py -3 build-all.py diff -Nru pycxx-7.1.4/build-all.py pycxx-7.1.7/build-all.py --- pycxx-7.1.4/build-all.py 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-7.1.7/build-all.py 2022-02-13 09:54:28.000000000 +0000 @@ -0,0 +1,110 @@ +#!/usr/bin/python3 +import sys +import subprocess + +first_limited_api_minor = 4 + +# (major, minor, bits, vc_ver) +default_versions_to_test = [ + (2, 7, 32, '9.0'), (2, 7, 64, '9.0'), + (3, 3, 32, '10.0'), # no compiler for windows 64 bit + (3, 4, 32, '10.0'), # no compiler for windows 64 bit + (3, 5, 32, '14.0'), (3, 5, 64, '14.0'), + (3, 6, 32, '14.0'), (3, 6, 64, '14.0'), + (3, 7, 32, '14.0'), (3, 7, 64, '14.0'), + (3, 8, 32, '14.0'), (3, 8, 64, '14.0'), + (3, 9, 32, '14.0'), (3, 9, 64, '14.0'), + (3, 10, 32, '14.0'), (3, 10, 64, '14.0'), + (3, 11, 32, '14.0'), (3, 11, 64, '14.0'), +] + +def main( argv ): + dry_run = False + all_versions_to_test = [] + + for arg in argv[1:]: + if arg == '--dry-run': + dry_run = True + else: + # convert all the args into a list of verions to test + # assume py.exe format maj.min or maj.min-bits + try: + if '-' in arg: + major_minor, bits = arg.split('-') + + else: + major_minor = arg + bits = '64' + + major, minor = major_minor.split('.') + + major = int(major) + minor = int(minor) + bits = int(bits) + + except ValueError: + print( 'Error: Expecting .[-] 3.9-64 given %r' % (arg,) ) + return 1 + + # find the vc_ver from the default_versions_to_test + vc_ver = None + for info in default_versions_to_test: + if info[:3] == (major, minor, bits): + vc_ver = info[3] + + if vc_ver is None: + print( 'Error: Update default_versions_to_test for %d.%d-%d - vc_ver cannot be determined' % + (major, minor, bits) ) + return 1 + + all_versions_to_test.append( (major, minor, bits, vc_ver) ) + + if len(all_versions_to_test) == 0: + all_versions_to_test = default_versions_to_test + + # + # Run all the requested builds + # + is_win = sys.platform.startswith( 'win' ) + for major, minor, bits, vc_ver in all_versions_to_test: + if is_win: + fmt = '.\\%s.cmd' + + else: + # Only windows needs to build both 32 and 64 bit + # for the mac and linux only build once + if bits == 32: + continue + + fmt = './%s.sh' + + if is_win: + cmd = [fmt % ('build-unlimited-api',), '%d.%d' % (major, minor), '%d' % (bits,), vc_ver] + + else: + cmd = [fmt % ('build-unlimited-api',), 'python%d.%d' % (major, minor)] + + print( 'Info: %s' % (' '.join(cmd),), flush=True ) + if not dry_run: + subprocess.run( cmd ) + + if major == 2: + continue + + for api_minor in range( first_limited_api_minor, minor+1 ): + if is_win: + cmd = [fmt % ('build-limited-api',), '%d.%d' % (major, minor), '%d' % (bits,), vc_ver] + + else: + cmd = [fmt % ('build-limited-api',), 'python%d.%d' % (major, minor)] + + # add the API version to use + cmd.append( '%d.%d' % (major, api_minor) ) + print( 'Info: %s' % (' '.join(cmd),), flush=True ) + if not dry_run: + subprocess.run( cmd ) + + return 0 + +if __name__ == '__main__': + sys.exit( main( sys.argv ) ) diff -Nru pycxx-7.1.4/build-all.sh pycxx-7.1.7/build-all.sh --- pycxx-7.1.4/build-all.sh 2018-06-04 15:58:11.000000000 +0000 +++ pycxx-7.1.7/build-all.sh 2021-02-06 14:56:19.000000000 +0000 @@ -1,31 +1,3 @@ #!/bin/bash -set -x set -e -set -o pipefail - -for PYTHON in \ - python2.6 \ - python2.7 \ - python3.3 \ - python3.4 \ - python3.5 \ - python3.6 \ - python3.7 \ - python3.8 \ - python3.9 \ - ; -do - if which $PYTHON >/dev/null - then - echo "Info: Found ${PYTHON}" - ./build-unlimited-api.sh ${PYTHON} - - case "${PYTHON}" in - python3.3) - ;; - python3.*) - ./build-limited-api.sh ${PYTHON} ${PYTHON#python} - ;; - esac - fi -done +./build-all.py "$@" diff -Nru pycxx-7.1.4/build-limited-api.cmd pycxx-7.1.7/build-limited-api.cmd --- pycxx-7.1.4/build-limited-api.cmd 2019-02-18 14:03:52.000000000 +0000 +++ pycxx-7.1.7/build-limited-api.cmd 2021-02-06 14:56:19.000000000 +0000 @@ -1,10 +1,11 @@ setlocal -rem Mm e.g. 24 36 etc +rem M.m e.g. 2.7 3.6 etc set PYTHON_VER=%1 -rem win32 or win64 +rem 32 or 64 set PYTHON_ARCH=%2 rem 10.0, 14.0 set VC_VER=%3 +rem 3.5 etc set API=%4 echo ------------------------------------------------------ @@ -28,11 +29,11 @@ ) if exist c:\python%PYTHON_VER%.%PYTHON_ARCH%\python.exe ( - c:\python%PYTHON_VER%.%PYTHON_ARCH%\python setup_makefile.py %PYTHON_ARCH% tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak --limited-api=%API% + py -%PYTHON_VER%-%PYTHON_ARCH% setup_makefile.py win%PYTHON_ARCH% tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak --limited-api=%API% if errorlevel 1 exit /b 1 - nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak clean all 2>&1 | c:\UnxUtils\usr\local\wbin\tee.exe tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.log + nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak clean all 2>&1 | py -3 build_tee tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.log if not exist obj\pycxx_iter.pyd exit /b 1 - nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak test 2>&1 | c:\UnxUtils\usr\local\wbin\tee.exe tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-test.log + nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-build.mak test 2>&1 | py -3 build_tee -a tmp-%PYTHON_ARCH%-python%PYTHON_VER%-limited-%API%-test.log echo All done ) endlocal diff -Nru pycxx-7.1.4/build-limited-api.sh pycxx-7.1.7/build-limited-api.sh --- pycxx-7.1.4/build-limited-api.sh 2018-09-17 09:57:18.000000000 +0000 +++ pycxx-7.1.7/build-limited-api.sh 2021-02-06 14:56:19.000000000 +0000 @@ -21,6 +21,6 @@ PYTHON_BASE=$(basename ${PYTHON}) -${PYTHON} setup_makefile.py ${OS} tmp-${PYTHON_BASE}-limited-api.mak --limited-api=${API} -make -f tmp-${PYTHON_BASE}-limited-api.mak clean 2>&1 | tee tmp-${PYTHON_BASE}-limited-api.log -make -f tmp-${PYTHON_BASE}-limited-api.mak test 2>&1 | tee -a tmp-${PYTHON_BASE}-limited-api.log +${PYTHON} setup_makefile.py ${OS} tmp-${PYTHON_BASE}-limited-api-${API}.mak --limited-api=${API} +make -f tmp-${PYTHON_BASE}-limited-api-${API}.mak clean 2>&1 | tee tmp-${PYTHON_BASE}-limited-api-${API}.log +make -f tmp-${PYTHON_BASE}-limited-api-${API}.mak test 2>&1 | tee -a tmp-${PYTHON_BASE}-limited-api-${API}.log diff -Nru pycxx-7.1.4/build_tee.py pycxx-7.1.7/build_tee.py --- pycxx-7.1.4/build_tee.py 1970-01-01 00:00:00.000000000 +0000 +++ pycxx-7.1.7/build_tee.py 2021-02-06 14:56:19.000000000 +0000 @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +import sys +import re + +def main( argv ): + all_copies = [] + i_args = iter( argv ) + next( i_args ) + + mode = 'w' + + for filename in i_args: + if filename == '-a': + mode = 'a' + else: + all_copies.append( open( filename, 'w' ) ) + + colour = re.compile( r'\033\[[\d;]*m' ) + + for line in sys.stdin: + # allow colours to be shown seen + sys.stdout.write( line ) + + # remove colouring from log files. + line = colour.sub( '', line ) + + for copy in all_copies: + copy.write( line ) + + return 0 + +if __name__ == '__main__': + sys.exit( main( sys.argv ) ) diff -Nru pycxx-7.1.4/build-unlimited-api.cmd pycxx-7.1.7/build-unlimited-api.cmd --- pycxx-7.1.4/build-unlimited-api.cmd 2019-02-18 14:03:52.000000000 +0000 +++ pycxx-7.1.7/build-unlimited-api.cmd 2021-02-06 14:56:19.000000000 +0000 @@ -38,8 +38,8 @@ if exist c:\python%PYTHON_VER%.%PYTHON_ARCH%\python.exe ( c:\python%PYTHON_VER%.%PYTHON_ARCH%\python setup_makefile.py %PYTHON_ARCH% tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.mak if errorlevel 1 exit /b 1 - nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.mak clean all 2>&1 | c:\UnxUtils\usr\local\wbin\tee.exe tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.log + nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.mak clean all 2>&1 | py -3 build_tee tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.log if not exist obj\pycxx_iter.pyd exit /b 1 - nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.mak test 2>&1 | c:\UnxUtils\usr\local\wbin\tee.exe tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-test.log + nmake -f tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-build.mak test 2>&1 | py -3 build_tee -a tmp-%PYTHON_ARCH%-python%PYTHON_VER%-unlimited-test.log ) endlocal diff -Nru pycxx-7.1.4/CXX/Python3/Objects.hxx pycxx-7.1.7/CXX/Python3/Objects.hxx --- pycxx-7.1.4/CXX/Python3/Objects.hxx 2020-05-25 11:11:01.000000000 +0000 +++ pycxx-7.1.7/CXX/Python3/Objects.hxx 2022-02-13 09:54:28.000000000 +0000 @@ -51,6 +51,7 @@ #include #include #include +#include namespace Py { @@ -1965,7 +1966,7 @@ #if !defined( Py_LIMITED_API ) Char( const unicodestring &v ) - : Object( PyUnicode_FromUnicode( const_cast( v.data() ),1 ), true ) + : Object( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast( v.data() ),1 ), true ) { validate(); } @@ -1987,7 +1988,7 @@ #if !defined( Py_LIMITED_API ) Char &operator=( const unicodestring &v ) { - set( PyUnicode_FromUnicode( const_cast( v.data() ), 1 ), true ); + set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast( v.data() ), 1 ), true ); return *this; } #endif @@ -1996,7 +1997,7 @@ Char &operator=( int v_ ) { Py_UNICODE v( static_cast( v_ ) ); - set( PyUnicode_FromUnicode( &v, 1 ), true ); + set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, &v, 1 ), true ); return *this; } #endif @@ -2004,7 +2005,7 @@ #if !defined( Py_LIMITED_API ) Char &operator=( Py_UNICODE v ) { - set( PyUnicode_FromUnicode( &v, 1 ), true ); + set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, &v, 1 ), true ); return *this; } #endif @@ -2142,7 +2143,7 @@ #if !defined( Py_LIMITED_API ) String( const Py_UNICODE *s, int length ) - : SeqBase( PyUnicode_FromUnicode( s, length ), true ) + : SeqBase( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, s, length ), true ) { validate(); } @@ -2164,7 +2165,7 @@ #if !defined( Py_LIMITED_API ) String &operator=( const unicodestring &v ) { - set( PyUnicode_FromUnicode( const_cast( v.data() ), v.length() ), true ); + set( PyUnicode_FromKindAndData( PyUnicode_4BYTE_KIND, const_cast( v.data() ), v.length() ), true ); return *this; } #endif @@ -2190,6 +2191,7 @@ } #endif +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 9 #if !defined( Py_LIMITED_API ) const Py_UNICODE *unicode_data() const { @@ -2203,6 +2205,8 @@ return unicodestring( unicode_data(), PyUnicode_GetLength( ptr() ) ); } #endif +#endif + ucs4string as_ucs4string() const { Py_UCS4 *buf = new Py_UCS4[ size() ]; @@ -3253,7 +3257,7 @@ } return asObject( result ); } -#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 9 +#if (!defined( Py_LIMITED_API ) && PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 9) || (defined( Py_LIMITED_API ) && Py_LIMITED_API+0 >= 0x03090000) Object apply() const { PyObject *result = PyObject_CallNoArgs( ptr() ); diff -Nru pycxx-7.1.4/CXX/Version.hxx pycxx-7.1.7/CXX/Version.hxx --- pycxx-7.1.4/CXX/Version.hxx 2020-05-18 12:29:32.000000000 +0000 +++ pycxx-7.1.7/CXX/Version.hxx 2022-02-13 10:26:55.000000000 +0000 @@ -40,7 +40,7 @@ #define PYCXX_VERSION_MAJOR 7 #define PYCXX_VERSION_MINOR 1 -#define PYCXX_VERSION_PATCH 4 +#define PYCXX_VERSION_PATCH 7 #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-7.1.4/debian/changelog pycxx-7.1.7/debian/changelog --- pycxx-7.1.4/debian/changelog 2021-11-20 20:16:01.000000000 +0000 +++ pycxx-7.1.7/debian/changelog 2022-05-29 17:40:22.000000000 +0000 @@ -1,3 +1,26 @@ +pycxx (7.1.7-1) unstable; urgency=medium + + * Team upload. + + [ Boyuan Yang ] + * New upstream release. + + Fix compatibility with python3.9+. + * Bump debhelper from deprecated 9 to 13. + * Bump Standards-Version to 4.6.1. + * debian/rules: Use "dh_missing --list-missing" due to manual + file installation. + + [ Debian Janitor ] + * Trim trailing whitespace. + + [ Ondřej Nový ] + * d/control: Update Maintainer field with new Debian Python Team + contact address. + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + -- Boyuan Yang Sun, 29 May 2022 13:40:22 -0400 + pycxx (7.1.4-0.2) unstable; urgency=medium * Non-maintainer upload diff -Nru pycxx-7.1.4/debian/control pycxx-7.1.7/debian/control --- pycxx-7.1.4/debian/control 2020-08-20 23:22:10.000000000 +0000 +++ pycxx-7.1.7/debian/control 2022-05-29 17:36:12.000000000 +0000 @@ -1,17 +1,17 @@ Source: pycxx Section: python Priority: optional -Maintainer: Debian Python Modules Team +Maintainer: Debian Python Team Uploaders: Julian Taylor Build-Depends: 2to3, - debhelper-compat (= 9), + debhelper-compat (= 13), dh-python, python3-all, python3-all-dbg -Standards-Version: 4.1.4 +Standards-Version: 4.6.1 Homepage: http://cxx.sourceforge.net -Vcs-Git: https://salsa.debian.org/python-team/modules/pycxx.git -Vcs-Browser: https://salsa.debian.org/python-team/modules/pycxx +Vcs-Git: https://salsa.debian.org/python-team/packages/pycxx.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/pycxx Package: python3-cxx-dev Architecture: all diff -Nru pycxx-7.1.4/debian/rules pycxx-7.1.7/debian/rules --- pycxx-7.1.4/debian/rules 2019-11-23 01:41:40.000000000 +0000 +++ pycxx-7.1.7/debian/rules 2022-05-29 17:30:44.000000000 +0000 @@ -47,9 +47,12 @@ override_dh_installdocs: dh_installdocs -A debian/README.Debian -override_dh_fixperms: +execute_before_dh_fixperms: chmod 644 $(CURDIR)/debian/python*-cxx-dev/usr/share/doc/python*-cxx-dev/examples/* - dh_fixperms override_dh_compress: dh_compress -X.py -X.cxx -X.hxx + +override_dh_missing: + # Most files installed via manual dh_install + dh_missing --list-missing diff -Nru pycxx-7.1.4/Demo/Python3/rangetest.cxx pycxx-7.1.7/Demo/Python3/rangetest.cxx --- pycxx-7.1.4/Demo/Python3/rangetest.cxx 2020-05-25 11:11:01.000000000 +0000 +++ pycxx-7.1.7/Demo/Python3/rangetest.cxx 2021-01-10 14:30:48.000000000 +0000 @@ -67,7 +67,7 @@ Py::List answer( w.apply( args ) ); test_assert( "extension object amethod 1 q1", answer[0], r2 ); - test_assert( "extension object amethod 1q2", answer[1], args[0] ); + test_assert( "extension object amethod 1 q2", answer[1], args[0] ); } { diff -Nru pycxx-7.1.4/Demo/Python3/simple.cxx pycxx-7.1.7/Demo/Python3/simple.cxx --- pycxx-7.1.4/Demo/Python3/simple.cxx 2020-05-25 13:22:09.000000000 +0000 +++ pycxx-7.1.7/Demo/Python3/simple.cxx 2022-02-13 09:54:28.000000000 +0000 @@ -16,7 +16,7 @@ #include "CXX/Extensions.hxx" #include - +#include class new_style_class: public Py::PythonClass< new_style_class > { diff -Nru pycxx-7.1.4/README.html pycxx-7.1.7/README.html --- pycxx-7.1.4/README.html 2020-05-31 12:18:38.000000000 +0000 +++ pycxx-7.1.7/README.html 2022-02-13 10:26:55.000000000 +0000 @@ -31,21 +31,21 @@

Windows Installation and Demo

    -
  1. Fetch - http://prdownloads.sourceforge.net/cxx/pycxx-7.1.4.tar.gz
  2. +
  3. Fetch + http://prdownloads.sourceforge.net/cxx/pycxx-7.1.7.tar.gz
  4. Expand the archive into a directory of your choosing C:\ for example.
  5. Install the PyCXX files:
      -
    1. C:> cd \pycxx-7.1.4
    2. -
    3. C:\pycxx-7.1.4> python setup.py install
    4. +
    5. C:> cd \pycxx-7.1.7
    6. +
    7. C:\pycxx-7.1.7> python setup.py install
  6. Build and run the demo extensions:
      -
    1. C:> cd \pycxx-7.1.4
    2. -
    3. C:\pycxx-7.1.4> python setup_makefile.py win32 win32.mak 
    4. -
    5. C:\pycxx-7.1.4> nmake -f win32.mak clean test
    6. +
    7. C:> cd \pycxx-7.1.7
    8. +
    9. C:\pycxx-7.1.7> python setup_makefile.py win32 win32.mak 
    10. +
    11. C:\pycxx-7.1.7> nmake -f win32.mak clean test
@@ -54,18 +54,18 @@

Unix Installation and Demo

    -
  1. Fetch - http://prdownloads.sourceforge.net/cxx/pycxx-7.1.4.tar.gz +
  2. Fetch + http://prdownloads.sourceforge.net/cxx/pycxx-7.1.7.tar.gz
  3. Login as root. root access is typically needed on Unix systems to install the PyCXX files into the Python directories.
  4. Expand the archive into a directory of your choosing ~\ for example.
  5. Install the PyCXX files:
      -
    1. # cd ~/pycxx-7.1.4
      +
    2. # cd ~/pycxx-7.1.7
    3. # python setup.py install
  6. Build and run the demo extensions:
      -
    1. # cd ~/pycxx-7.1.4
    2. +
    3. # cd ~/pycxx-7.1.7
    4. # python setup_makefile.py linux linux.mak
    5. # make -f linux.mak clean test
    @@ -74,6 +74,32 @@

    Revision History

    +

    Version: 7.1.7 (13-Feb-2022)

    + +

    This Version 7.1.6 with README updates

    + +

    Version: 7.1.6 (14-Feb-2022)

    + +

    Add support for building against python 3.11 alpha 4.

    + +

    Version: 7.1.5 (21-Feb-2021)

    + +

    Replace use of deprecated PyUnicode APIs with the supported version.

    + +

    The class Py::String functions that used deprecated PyUnicode APIs +that have no replacements are not available for python 3.9 and later:

    + +
    +    const Py_UNICODE *unicode_data() const;
    +    unicodestring as_unicodestring() const;
    +
    + +

    Replace build-all.sh and build-all.cmd with build-all.py that can handle the build matrix.

    +

    Add limited API builds for all possible combinations.

    +

    Note: Python 3.9 has a bug that prevents use of the limited API until this bug is fix and shipped: +BPO 43155 for details. +The workaround is to set Py_LIMITED_API to use python 3.8.

    +

    Version: 7.1.4 (31-May-2020)

    Add support for more number methods, like matrix and the inplace versions.

    diff -Nru pycxx-7.1.4/README.txt pycxx-7.1.7/README.txt --- pycxx-7.1.4/README.txt 2020-05-31 12:18:38.000000000 +0000 +++ pycxx-7.1.7/README.txt 2022-02-13 10:26:55.000000000 +0000 @@ -1,9 +1,5 @@ -Version: 7.1.4 (31-May-2020) +Version: 7.1.7 (13-Feb-2022) -Add support for more number methods, like matrix and the inplace versions. +Add support for building against python 3.11 alpha 4. -Use IsInstance checking so that derived classes of builtin types can be used. - -Update Docs with recent changes. - -Add support for python 3.9 beta 1 changes. +This Version 7.1.6 with README updates diff -Nru pycxx-7.1.4/setup_makefile.py pycxx-7.1.7/setup_makefile.py --- pycxx-7.1.4/setup_makefile.py 2018-10-02 18:41:33.000000000 +0000 +++ pycxx-7.1.7/setup_makefile.py 2021-02-06 14:56:19.000000000 +0000 @@ -18,7 +18,7 @@ def __init__( self, argv ): args = argv[1:] if len(args) < 2: - raise ValueError( 'Usage: setup.py win32|win64|macosx|linux> ' ) + raise ValueError( 'Usage: setup_makefile.py win32|win64|macosx|linux> ' ) self.opt_debug = False self.opt_pycxx_debug = False diff -Nru pycxx-7.1.4/tag_pycxx.py pycxx-7.1.7/tag_pycxx.py --- pycxx-7.1.4/tag_pycxx.py 2016-08-17 10:11:10.000000000 +0000 +++ pycxx-7.1.7/tag_pycxx.py 2022-02-13 10:09:15.000000000 +0000 @@ -2,6 +2,25 @@ import sys import os +def check_version( version ): + vars = {} + with open('CXX/Version.hxx') as f: + for line in f: + words = line.split() + + if( len(words) >= 3 + and words[0] == '#define' + and words[1].startswith('PYCXX_VERSION_') ): + vars[ words[1] ] = words[2] + + defined_version = '%(PYCXX_VERSION_MAJOR)s.%(PYCXX_VERSION_MINOR)s.%(PYCXX_VERSION_PATCH)s' % vars + print( 'Info: %s defined in Version.hxx' % (defined_version,) ) + if defined_version == version: + return True + + print( 'Error: %s does not match defined version' % (version,) ) + return False + def make_tag( from_url, tag_base_url, version ): client = pysvn.Client() client.callback_get_log_message = lambda : (True, 'Tag version '+version) @@ -18,19 +37,19 @@ tag_files = client.ls( tag_base_url, recurse=False ) print( 'Info: Found', tag_base_url ) except pysvn.ClientError as e: - print( 'Error: Tag base does not exist',tag_base_url ) + print( 'Error: Tag base does not exist', tag_base_url ) return cur_versions = [os.path.basename(f['name']) for f in tag_files] if version in cur_versions: - print( 'Error: Already tagged',version ) + print( 'Error: Already tagged', version ) return try: to_url = tag_base_url + '/' + version - print( 'Info: Copy',repr(from_url), repr(to_url) ) + print( 'Info: Copy', repr(from_url), repr(to_url) ) client.copy( from_url, to_url ) print( 'Info: Copy complete' ) except pysvn.ClientError as e: @@ -38,36 +57,40 @@ return def callback_getLogin( realm, username, may_save ): - print( 'May save:',may_save ) - print( 'Realm:',realm ) + print( 'May save:', may_save ) + print( 'Realm:', realm ) if username: - print( 'Username:',username ) + print( 'Username:', username ) else: - sys.stdout.write( 'Username: ' ) + print( 'Username: ', end='', flush=True ) username = sys.stdin.readline().strip() if len(username) == 0: return 0, '', '', False - sys.stdout.write( 'Password: ' ) + print( 'Password: ', end='', flush=True ) password = sys.stdin.readline().strip() save_password = 'x' while save_password.lower() not in ['y','ye','yes','n', 'no','']: - sys.stdout.write( 'Save password? [y/n] ' ) + print( 'Save password? [y/n] ', end='', flush=True ) save_password = sys.stdin.readline().strip() return 1, username, password, save_password in ['y','ye','yes'] -def main(): - if len(sys.argv) != 2: - print( 'Usage: %s version' % sys.argv[0] ) +def main( argv ): + if len(argv) != 2: + print( 'Usage: %s ' % (sys.argv[0],) ) return version = sys.argv[1] + + if not check_version( version ): + return 1 + 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 ) if __name__ == '__main__': - main() + sys.exit( main( sys.argv ) )