summaryrefslogtreecommitdiff
path: root/Examples/python/import_packages/same_modnames2
Commit message (Collapse)AuthorAgeFilesLines
* Fix various typosluz paz2022-04-111-1/+1
| | | Found via `codespell -q 3 -L ans,anumber,ba,bae,chello,clos,cmo,coo,dout,fo,funktion,goin,inout,methid,nd,nin,nnumber,object,objekt,od,ois,packag,parm,parms,pres,statics,strack,struc,tempdate,te,thru,uint,upto,writen`
* Modify examples to be both Python 2 and 3 compatibleWilliam S Fulton2020-08-151-4/+4
| | | | For removing dependency on 2to3
* Skip Python subprocess calls in import_packages testcase on WindowsWilliam S Fulton2018-12-061-2/+7
| | | | | | | | | | | | | 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
* Fix for running 'python -m' when using swig -builtinWilliam S Fulton2018-12-041-0/+6
| | | | | | Same as e05b5ea for -builtin. Also added runtime tests to check 'python -m'.
* Drop support for Python classic classesOlly Betts2018-10-121-4/+0
| | | | | | | | | | | | There were only needed to support Python < 2.2, and we now require at least Python 2.6. Conflicts: .travis.yml Examples/test-suite/python/autodoc_runme.py Source/Modules/python.cxx This is a cherry-pick and merge from patch in #1261
* Support checking names of old-style classic classesAlec Cooper2016-02-041-2/+8
|
* Remove use of preinst-swig scriptWilliam S Fulton2015-08-212-10/+16
| | | | | | | | | | | | | Complete the prototype removal in ca1431. The script prevents SWIGTOOL=gdb from working as gdb can't be used to debug a shell script, it requires a binary. Add support for SWIGTOOL in all the examples. SWIG_LIB_DIR and SWIGEXE must now instead be set by all Makefiles. See issue #473.
* Remove realpath from python/import_packages exampleWilliam S Fulton2015-08-203-8/+6
|
* autopep8 cleanup of Examples/python whitespaceJon Schlueter2015-05-081-2/+2
| | | | automated cleanup only of the Examples/python example code
* Display testname when running the import_packages Python examplesWilliam S Fulton2014-10-071-0/+5
| | | | For easier identification of what is running in these examples.
* Allow examples and test-suite to be built out of source treeKarl Wette2014-05-113-8/+8
| | | | | | | | | | | | | | | | | | | | | | | - 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-011-0/+3
| | | | | 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-2411-0/+100
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