Commit graph

37 commits

Author SHA1 Message Date
William S Fulton
dd40a25349 Add missing print statements to the Python import_packages tests 2016-06-06 22:12:56 +01:00
William S Fulton
53ff928688 Examples readme file tweak 2016-06-05 11:23:58 +01:00
Mike Romberg
2ea01f349d remove builtin tests as they are already covered. 2016-06-04 14:12:33 -06:00
Mike Romberg
0cc3c78abf Apply patch to cleanup whitespace from wsfulton 2016-06-04 14:07:50 -06:00
Mike Romberg
906564d97c and... remove all the .py files that were copied over from the source tree. 2016-06-03 20:20:33 -06:00
Mike Romberg
055ddc6dfc remove -py3 related tests. Move py3 specific code to it's own module 2016-06-03 18:11:07 -06:00
Mike Romberg
f102d587bc copy everything with a .py extension into the build tree (creating dirs if needed) 2016-06-03 17:30:01 -06:00
Mike Romberg
f1aea15cf7 debug 2016-06-03 13:26:12 -06:00
Mike Romberg
f3c373a584 avoid the shell checks involving __init__.py 2016-06-03 03:17:19 -06:00
Mike Romberg
621325a7dd Something optimizes out empty files and breaks the tests. Put something in. 2016-06-03 01:30:43 -06:00
Mike Romberg
ddc9fc1eb9 split_wrapper -> split_modules to avoid conflict with clean rule 2016-06-02 22:45:59 -06:00
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
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
f6e25f5786 PY3 fixes for import_package example 2015-04-04 02:17:57 +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
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
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
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