For your consideration, a patch to allow the creation of release tarballs that 
support py2 bindings (instead of py3 ones).

-- Mike
Allow the creation of a release tarball that supports py2 bindings.

* build/generator/gen_make.py
  (write_standalone): Allow environmental override of the SWIG_PY_OPTS
    value written to autogen-standalone.mk.

Index: build/generator/gen_make.py
===================================================================
--- build/generator/gen_make.py (revision 1876320)
+++ build/generator/gen_make.py (working copy)
@@ -511,7 +513,9 @@
     standalone.write('top_srcdir = .\n')
     standalone.write('top_builddir = .\n')
     standalone.write('SWIG = swig\n')
-    standalone.write('SWIG_PY_OPTS = -python -py3 -nofastunpack -modern\n')
+    swig_py_opts = os.environ.get('SWIG_PY_OPTS',
+                                  '-python -py3 -nofastunpack -modern')
+    standalone.write('SWIG_PY_OPTS = %s\n' % (swig_py_opts))
     standalone.write('PYTHON = ' + sys.executable + '\n')
     standalone.write('\n')
     standalone.write(open("build-outputs.mk","r").read())

Reply via email to