parent
18bc3e287b
commit
1757f548a4
2 changed files with 11 additions and 2 deletions
|
|
@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|||
Version 4.1.0 (in progress)
|
||||
===========================
|
||||
|
||||
2021-04-12: olly
|
||||
#1777 [Python] Specifying -py3 now generates a check for Python
|
||||
version >= 3.0.
|
||||
|
||||
2021-03-26: olly
|
||||
[PHP] Add PHP keywords 'fn' (added in 7.4) and 'match' (added in
|
||||
8.0) to the list SWIG knows to automatically rename.
|
||||
|
|
|
|||
|
|
@ -846,8 +846,13 @@ public:
|
|||
Printv(f_shadow_py, "\n", f_shadow_begin, "\n", NIL);
|
||||
|
||||
Printv(f_shadow_py, "\nfrom sys import version_info as _swig_python_version_info\n", NULL);
|
||||
Printv(f_shadow_py, "if _swig_python_version_info < (2, 7, 0):\n", NULL);
|
||||
Printv(f_shadow_py, tab4, "raise RuntimeError(\"Python 2.7 or later required\")\n\n", NULL);
|
||||
if (py3) {
|
||||
Printv(f_shadow_py, "if _swig_python_version_info < (3, 0):\n", NULL);
|
||||
Printv(f_shadow_py, tab4, "raise RuntimeError(\"Python 3.x or later required\")\n\n", NULL);
|
||||
} else {
|
||||
Printv(f_shadow_py, "if _swig_python_version_info < (2, 7, 0):\n", NULL);
|
||||
Printv(f_shadow_py, tab4, "raise RuntimeError(\"Python 2.7 or later required\")\n\n", NULL);
|
||||
}
|
||||
|
||||
if (Len(f_shadow_after_begin) > 0)
|
||||
Printv(f_shadow_py, f_shadow_after_begin, "\n", NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue