swig/Examples/python/import_packages/namespace_pkg
William S Fulton ff93f2e26e Skip Python subprocess calls in import_packages testcase on Windows
Getting these kind of errors on Appveyor which uses mingw/cygwin to run
a Python interpreter:

Native windows Python 3.6 running under cygwin and mingw Python 3.7 running under mingw:
  Fatal Python error: _Py_HashRandomization_Init: failed to get random
  numbers to initialize Python

Cygwin Python 2.7 running under cygwin:
  0 [main] python2.7 496 child_info_fork::abort: address space needed by '_foo.dll' (0x6D0000)
  is already occupied
2018-12-06 06:50:57 +00:00
..
Makefile use %inline for test 2016-05-24 22:46:45 +01:00
nonpkg.py Skip Python subprocess calls in import_packages testcase on Windows 2018-12-06 06:50:57 +00:00
normal.py Skip Python subprocess calls in import_packages testcase on Windows 2018-12-06 06:50:57 +00:00
nstest.py Skip Python subprocess calls in import_packages testcase on Windows 2018-12-06 06:50:57 +00:00
README Examples (and tests) for python namespace packages 2016-04-05 10:58:50 -06:00
robin.i use %inline for test 2016-05-24 22:46:45 +01:00
runme.py Fix for running 'python -m' when using swig -builtin 2018-12-04 19:12:13 +00:00
split.py Skip Python subprocess calls in import_packages testcase on Windows 2018-12-06 06:50:57 +00:00
zipsplit.py Skip Python subprocess calls in import_packages testcase on Windows 2018-12-06 06:50:57 +00:00

  This is an example (and test) of using swig generated modules in the context
of python3's namespace packages:

https://www.python.org/dev/peps/pep-0420/

  Consequently, this example requires python (3.3 or newer) to build and run.

  This example creates a simple swig module named robin.  The robin.py module
has a companion C module named _robin.so.  The robin module is tested in four
ways:

  1) As a non-package module (tested by nonpkg.py)

  2) With robin.py and _robin.so in the brave package under the path1
     subdirectory.  (tested by normal.py)

  3) With robin.py in path2/brave and _robin.so in path3/brave
     (tested by split.py)

  4) With robin.py contained in a zip file (path4.zip) as brave/robin.py and
     _robin.so found on the filesystem under path3/brave (tested by zipsplit.py)

Note: Using namespace packages with subpackages (such as brave.sir.robin) where
      robin.py is located in a zipfile requires python-3.5.1 or newer as
      python's zipimporter only worked with packages of depth 1 until then.