-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.6.1dev: add Python 3.12 to build workflow of GitHub Actions
git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17792 af82e41b-90c4-0310-8c96-b1721e28e2e2
- Loading branch information
jomae
committed
May 5, 2024
1 parent
7d21fb1
commit f814427
Showing
5 changed files
with
133 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Index: build/generator/gen_base.py | ||
=================================================================== | ||
--- build/generator/gen_base.py (revision 1900881) | ||
+++ build/generator/gen_base.py (revision 1900882) | ||
@@ -76,7 +76,7 @@ | ||
|
||
# Now read and parse build.conf | ||
parser = configparser.ConfigParser() | ||
- parser.readfp(open(fname)) | ||
+ parser.read_file(open(fname)) | ||
|
||
self.conf = build_path(os.path.abspath(fname)) | ||
|
||
Index: build/generator/gen_win_dependencies.py | ||
=================================================================== | ||
--- build/generator/gen_win_dependencies.py (revision 1910097) | ||
+++ build/generator/gen_win_dependencies.py (revision 1910098) | ||
@@ -1045,12 +1045,13 @@ | ||
"Find the appropriate options for creating SWIG-based Python modules" | ||
|
||
try: | ||
- from distutils import sysconfig | ||
- | ||
- inc_dir = sysconfig.get_python_inc() | ||
- lib_dir = os.path.join(sysconfig.PREFIX, "libs") | ||
+ import sysconfig | ||
except ImportError: | ||
return | ||
+ config_vars = sysconfig.get_config_vars() | ||
+ inc_dir = config_vars['INCLUDEPY'] | ||
+ base_dir = config_vars.get('installed_base') or config_vars.get('base') | ||
+ lib_dir = os.path.join(base_dir, 'libs') | ||
|
||
if sys.version_info[0] >= 3: | ||
if self.swig_version < (3, 0, 10): | ||
Index: build/get-py-info.py | ||
=================================================================== | ||
--- build/get-py-info.py (revision 1910097) | ||
+++ build/get-py-info.py (revision 1910098) | ||
@@ -44,7 +44,16 @@ | ||
usage() | ||
|
||
try: | ||
- from distutils import sysconfig | ||
+ if sys.version_info[0] == 2: | ||
+ from distutils import sysconfig | ||
+ get_include = lambda: sysconfig.get_python_inc() | ||
+ get_platinclude = lambda: sysconfig.get_python_inc(plat_specific=1) | ||
+ get_purelib = lambda: sysconfig.get_python_lib() | ||
+ else: | ||
+ import sysconfig | ||
+ get_include = lambda: sysconfig.get_path('include') | ||
+ get_platinclude = lambda: sysconfig.get_path('platinclude') | ||
+ get_purelib = lambda: sysconfig.get_path('purelib') | ||
except ImportError: | ||
# No information available | ||
print("none") | ||
@@ -51,8 +60,8 @@ | ||
sys.exit(1) | ||
|
||
if sys.argv[1] == '--includes': | ||
- inc = sysconfig.get_python_inc() | ||
- plat = sysconfig.get_python_inc(plat_specific=1) | ||
+ inc = get_include() | ||
+ plat = get_platinclude() | ||
if inc == plat: | ||
print("-I" + inc) | ||
else: | ||
@@ -140,7 +149,7 @@ | ||
sys.exit(0) | ||
|
||
if sys.argv[1] == '--site': | ||
- print(sysconfig.get_python_lib()) | ||
+ print(get_purelib()) | ||
sys.exit(0) | ||
|
||
usage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Index: subversion/bindings/swig/include/proxy.swg | ||
=================================================================== | ||
--- subversion/bindings/swig/include/proxy.swg (revision 1905172) | ||
+++ subversion/bindings/swig/include/proxy.swg (revision 1905173) | ||
@@ -66,7 +66,6 @@ | ||
fn() | ||
|
||
%} | ||
-#if defined(SWIGPYTHON_PY3) | ||
#if SWIG_VERSION >= 0x040000 | ||
%pythoncode %{ | ||
# -classic and -modern options have been dropped and this variable | ||
@@ -76,7 +75,7 @@ | ||
_set_instance_attr = _swig_setattr_nondynamic_instance_variable(object.__setattr__) | ||
|
||
%} | ||
-#else | ||
+#elif defined(SWIGPYTHON_PY3) | ||
%pythoncode %{ | ||
# SWIG classes generated with -modern do not define this variable | ||
try: | ||
@@ -90,7 +89,6 @@ | ||
_set_instance_attr = _swig_setattr_nondynamic_method(object.__setattr__) | ||
|
||
%} | ||
-#endif | ||
#else | ||
%pythoncode %{ | ||
# SWIG classes generated with -classic do not define this variable, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters