On 11/27/2016 01:40 PM, Alan W. Irwin wrote: > It is good to hear it is likely going to be even easier than I thought. I > guess that -py3 flag is needed for more complex Python bindings than ours.
Spoke too soon I guess. It appears that swig detects which version of Python you are using and creates a binding that only works with that version. So if you create the bindings in a Python3 environment they will not work with Python2 and vice versa. > I have looked at the naming conventions used in practice for > python-2.6 and python-2.7 on Debian, and even there the old-fashioned idea > of inserting a "module" suffix on the basename of the shared object > has mostly (but not completely) fallen out of favour. So it is fine > with me if you drop the module part of the shared object name as well. I just changed the output target from _plplotcmodule to _plplotc. Maybe this will have some downstream consequences? > Try, > > make test_python_psc .. > Then, you can run that example individually > (_in the build tree_) as follows: > > examples/python/x00 -dev psc -o test.psc Thank you, this was very helpful. The Python bindings are now compatible with Python3 as well as Python2, as judged by running the (basic?) tests, i.e. $ make $ ctest New questions: (1) How does one run the tests that compare the example output files to each other so that I can verify that the output is still the same? (2) There appear to be at least two versions of each Python example. Maybe we could get rid of one set? i.e. the xNN.py set and not the xwNN.py set that are actually tested? (3) Based on the make output I think plplot_widgetmodule.c will not work with Python3. Is this important? Is there a test for this? If anyone is interested, my python3 branch is available here: https://github.com/HazenBabcock/PLplot/tree/python3 Just for testing though, don't do any work off of it :). I'm going to wait until after the release to push this into master as the changes were somewhat intrusive and are likely to have broken something. -Hazen ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel