Commit graph

236 commits

Author SHA1 Message Date
Mike Romberg
355e4b4903 Add cases for tests without the -py3 flag even when PY3 is set. 2016-06-02 17:29:05 -06:00
Mike Romberg
3a459b3f27 Tests/Examples for the use case of splitting the wrapper.
Half of the wrapper in a package and 1/2 is global.
2016-06-02 14:17:38 -06:00
Mike Romberg
5ceef0a813 use %inline for test 2016-05-24 22:46:45 +01:00
Mike Romberg
32304449f9 disable namespace package build 2016-04-05 11:10:04 -06:00
Mike Romberg
6f1c0e3725 Attempt to calm the testing gods... 2016-04-05 11:10:03 -06:00
Mike Romberg
b6c93a14e4 use whatever name winders uses for .so files. 2016-04-05 11:09:14 -06:00
Mike Romberg
0a81b76b31 Examples (and tests) for python namespace packages 2016-04-05 11:06:02 -06:00
Mike Romberg
70a2a11f29 disable namespace package build 2016-04-05 10:58:51 -06:00
Mike Romberg
6f4aa4faf5 spelling 2016-04-05 10:58:50 -06:00
Mike Romberg
ce04d0cdf3 Attempt to calm the testing gods... 2016-04-05 10:58:50 -06:00
Mike Romberg
afc91fe923 use whatever name winders uses for .so files. 2016-04-05 10:58:50 -06:00
Mike Romberg
c0cc731ca8 Don't run example for old pythons 2016-04-05 10:58:50 -06:00
Mike Romberg
ba158e7919 Examples (and tests) for python namespace packages 2016-04-05 10:58:50 -06:00
Alec Cooper
acbe04b548 Support checking names of old-style classic classes 2016-02-04 15:27:54 -05:00
William S Fulton
8e2bc595c6 Remove use of preinst-swig script
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.
2015-08-21 22:43:17 +01:00
William S Fulton
4ef3507e8b Remove realpath from python/import_packages example 2015-08-20 06:19:12 +01:00
William S Fulton
2b4dda39bb Warning fixes in generated Python code for 64bit Visual C++ on Windows. 2015-07-03 20:59:25 +01:00
William S Fulton
21aef52194 Merge branch 'yazug-python_examples_pep8_whitespace_cleanup'
* yazug-python_examples_pep8_whitespace_cleanup:
  Fixup 2 additional whitespace warnings pep8 found
  Add pep8 check for Examples/python
  autopep8 cleanup of Examples/python whitespace
2015-05-10 18:43:37 +01:00
William S Fulton
b4c441f62e Remove unused std_string.i from callback examples 2015-05-10 11:49:28 +01:00
Jon Schlueter
b909d0c680 Fixup 2 additional whitespace warnings pep8 found
E241 multiple spaces after ','

cleanup in enum/runme.py and constants/runme.py
2015-05-08 10:35:04 -04:00
Jon Schlueter
7770715457 autopep8 cleanup of Examples/python whitespace
automated cleanup only of the Examples/python example code
2015-05-08 08:46:06 -04:00
William S Fulton
ec7e7145aa Portability fixes for python example 2015-04-04 02:17:57 +01:00
William S Fulton
f6e25f5786 PY3 fixes for import_package example 2015-04-04 02:17:57 +01:00
Olly Betts
ac1f067ce9 Eliminate trivial differences between the reference examples 2014-11-07 15:34:43 +13:00
Olly Betts
37cd1474b5 Remove bogus ; after } in examples 2014-11-07 15:34:43 +13:00
William S Fulton
808d4b4798 Bypass Python exmples not supported by -builtin
Builtin classes as exceptions not supported, so don't run these aspects
of the examples when using -builtin.
2014-10-07 20:58:41 +01:00
William S Fulton
da394fae80 Remove Python swigrun example
By default it doesn't work as it does not call the CEO's __del__ method
as indicated in the comments. __del__ is called with -builtin but
then the base class's __del__ is not available and so it errors out.
Python 3 and -builtin goes into an endless loop. So removing as
hopelessly broken.
2014-10-07 20:58:41 +01:00
William S Fulton
a9c6196f71 Display testname when running the import_packages Python examples
For easier identification of what is running in these examples.
2014-10-07 20:58:40 +01:00
William S Fulton
9834a69c18 Fix Python 3 import_packages/relativeimport2 example clean
runme3.py files are generated and should not be checked in
2014-10-07 20:58:40 +01:00
Johan Hake
de4f30bd3c Small fixes to the relative import fix.
-- Now the tests actually runs
  -- Corrected the syntax for the fix in the yacc file
2014-09-29 17:37:41 +02:00
Johan Hake
1dd297ad9d Fix issue with relative import when using single header file import.
-- 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")
2014-08-12 21:48:26 +02:00
Karl Wette
cc0738bbda Fully clean Python examples and test-suite 2014-05-29 02:29:27 +02:00
William S Fulton
f39ed94419 Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 13:13:32 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- 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
2014-05-11 23:21:10 +02:00
Karl Wette
b6c1889c08 Fix {python|perl5|ruby|tcl}/java examples
- in Lib/gcj/cni.i: remove JvAllocObject(), change
  JvCreateJavaVM() argument from void* to JvVMInitArgs*
- in Examples/{python|perl5|ruby|tcl}/java/Makefile:
  pass full class name to gcjh, add Example.h as dependency,
  do not override CXX for compiling C++ sources
- in Examples/python/java/example.i:
  add destructor to class to prevent memory loss complaint
2014-05-02 21:44:42 +02:00
Karl Wette
3aacde4f5f Whitespace cleanup of Example Makefiles 2014-04-16 12:06:02 +02:00
William S Fulton
4fb940d913 Further fixes when using type() when using -builtin to include module name
Using type() on a builtin type should include the package and module
name, see http://docs.python.org/2/c-api/typeobj.html
2014-03-01 23:26:27 +00:00
Olly Betts
431b9b16e7 Update one dead link and remove another 2014-02-24 10:11:11 +13:00
Olly Betts
0de4cf13a8 Further cleaning up of class examples 2014-02-24 10:10:24 +13:00
Olly Betts
34c97ffdbd Improve the class example for several languages.
Fix numerous inaccuracies in index.html (where it exists) and eliminate
unnecessary differences between the example code being wrapped.
2014-02-23 18:24:51 +13:00
Olly Betts
2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
William S Fulton
b170788459 Executable bits and shebang fixes 2014-02-16 17:30:41 +00:00
Paweł Tomulik
5562deec62 Fixed SF bug #1297 (Python imports)
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
2013-12-24 17:22:25 +00:00
William S Fulton
152905e193 Fix gcc -Waddress warning in variables examples 2013-10-18 06:53:02 +01:00
William S Fulton
7f95c7bb3e Use a less confusing macro name, SWIG_PYTHON_NO_DEBUG => SWIG_PYTHON_INTERPRETER_NO_DEBUG 2013-06-11 19:15:57 +01:00
William S Fulton
5cdfc503e1 Add SWIG_PYTHON_NO_DEBUG macro for building Debug wrappers against the Python Debug dll 2013-06-11 00:22:21 -07:00
William S Fulton
b3ca22dc33 Fix Python examples to compile and run under Python 3 2013-05-26 23:02:13 +01:00
William S Fulton
cc4ac0a9e9 Python examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
William S Fulton
78cd350fe9 Fix Visual Studio examples to work when SWIG is unzipped into a directory containing spaces. 2013-01-15 07:18:20 +00:00
Stefan Zager
96c76cf9c0 Added .PHONY targets
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12615 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-07 21:20:10 +00:00