Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 support #31

Closed
kkremitzki opened this Issue Jul 30, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@kkremitzki
Copy link

kkremitzki commented Jul 30, 2018

Hi, this issue is basically a replica of aewallin/openvoronoi#39 for this repo; I've finished the Debian packaging for opencamlib in advance of the relicensing, and it seems like Python 3 support doesn't work out of the box. While I can build against Python 3, when I try python3 -c 'import ocl' I get ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.62.0: undefined symbol: PyString_Type. So, there are a few tweaks to be done yet.

@aewallin

This comment has been minimized.

Copy link
Owner

aewallin commented Jul 30, 2018

the way forward here is probably to have two builds/packages:

  • the pure c++ library
  • the python module

the python module could then be set up with travis-CI testing to run the tests on multiple python versions.

@aewallin aewallin added the python label Jan 16, 2019

@vespakoen

This comment has been minimized.

Copy link
Contributor

vespakoen commented Jan 16, 2019

This can be closed, it looks like you linked with the wrong libboost_python version (2.7).
The latest code on the master branch should pick up the right version when passing -DUSE_PY_3 to cmake.

Also note that the BUILD_PY_LIB flag is now OFF by default.

@aewallin

This comment has been minimized.

Copy link
Owner

aewallin commented Jan 16, 2019

closing this. please open specific issues (platform, versions, error messages, etc) if there still are problems.

@aewallin aewallin closed this Jan 16, 2019

@kkremitzki

This comment has been minimized.

Copy link
Author

kkremitzki commented Jan 18, 2019

Could we get a version bump now that Python 3 is working?

@kkremitzki

This comment has been minimized.

Copy link
Author

kkremitzki commented Jan 19, 2019

Pinging @aewallin just in case you didn't see my last message.

@aewallin

This comment has been minimized.

Copy link
Owner

aewallin commented Jan 20, 2019

  • I agree that a new release is a good idea
  • I made an Ubuntu/Debian PPA a long time ago, but I'm not sure if anyone still uses that? (https://launchpad.net/~anders-e-e-wallin/+archive/ubuntu/cam). I have probably forgotten how to update and maintain the PPA, so it would be better if someone with fresh knowledge would maintain a PPA (if it's useful)
  • For python there's also PyPi, but I don't know if they accept python modules that are based on C++.
  • I am a bit worried about the lack of tests
    -- do we really know it now works on python2 and python3
    -- most of my old VTK-based dev-scripts don't work anymore with the latest VTK
    -- basic tests of the core algorithms would be a good addition.

maybe this needs to be split into separate issues - so they can be addressed one by one?

@aewallin aewallin reopened this Jan 20, 2019

@kkremitzki

This comment has been minimized.

Copy link
Author

kkremitzki commented Jan 22, 2019

I made an Ubuntu/Debian PPA a long time ago, but I'm not sure if anyone still uses that? (https://launchpad.net/~anders-e-e-wallin/+archive/ubuntu/cam). I have probably forgotten how to update and maintain the PPA, so it would be better if someone with fresh knowledge would maintain a PPA (if it's useful)

I am maintaining an OpenCAMLib package in the FreeCAD Community Extras PPA.

For python there's also PyPi, but I don't know if they accept python modules that are based on C++.

Yes, it's possible--it would be good to distribute OpenCAMLib there as well.

maybe this needs to be split into separate issues - so they can be addressed one by one?

Probably, and IMO the only one I'd consider a blocker for a release is

-- do we really know it now works on python2 and python3

@vespakoen

This comment has been minimized.

Copy link
Contributor

vespakoen commented Jan 22, 2019

I have tested opencamlib on my computer and (for what it's worth) can verify it works with python 2 and 3 on macOS and Linux.
Adding an extra step to the travis build to run some tests (or call some example scripts) is trivial to do and I'll try to make a PR for it tomorrow.

Distributing precompiled libraries would be great, I hope we can set this up with travis as well someday (see their github releases docs, this needs some work from @aewallin to get access)

@aewallin aewallin closed this Feb 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.