summaryrefslogtreecommitdiff
path: root/Examples/python/import_packages
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix issue with relative import when using single header file import.Johan Hake2014-08-1223-0/+190
| | | | | | | | -- The commit propagates the package option to the newly create module node so it is recognized by SWIG -- Added a relativeimport test for this combination (in lack of py3 I was not able to test it with py3 but it "should just work")
* Fully clean Python examples and test-suiteKarl Wette2014-05-291-0/+5
|
* Allow examples and test-suite to be built out of source treeKarl Wette2014-05-1144-103/+108
| | | | | | | | | | | | | | | | | | | | | | | - Examples/Makefile.in rules use SRCDIR as the relative source directory - ./config.status replicates Examples/ source directory tree in build directory, and copies each Makefile to build directory, prefixed with a header which sets SRCDIR to source directory - Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir - Examples/test-suite/errors/Makefile.in needs to filter out source directory from SWIG error messages - Lua: embedded interpreters are passed location of run-time test - Python: copy run-time scripts to build directory because of 2to3 conversion; import_packages example copies __init__.py from source directory; test-suite sets SCRIPTDIR to location of run-time tests - Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir can be substituted with SRCDIR; removed './' from require() statements so that NODE_PATH can be used to point Node.js to build directory
* Further fixes when using type() when using -builtin to include module nameWilliam S Fulton2014-03-012-0/+5
| | | | | Using type() on a builtin type should include the package and module name, see http://docs.python.org/2/c-api/typeobj.html
* Fixed SF bug #1297 (Python imports)Paweł Tomulik2013-12-24144-0/+1380
This changeset resolves several issues related to python imports. For example, it's possible now to import modules having same module names, but belonging to different packages. From the user's viewpoint, this patch gives a little bit more control on import directives generated by swig. The user may choose to use relative or absolute imports (docs are provided in separate PR). Some details: - we (still) generate import directives in form 'import a.b.c' which corresponds to absolute imports in python3 and (the only available) ambiguous one in python2. - added -relativeimport option to use explicit relative import syntax (python3), Tests are under Examples/python, these are in fact regression tests but with the current swig testing framework it seems to be impossible to put appropriate tests under test-suite. Closes #7