-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support for python 3 #25
Comments
Hi. It would be best if you open a pull-request with a fix, so that we are compatible with both python2 and python3. |
Hi, is there any news on this topic? Is anybody planning to make it compatible with python3? |
As I wrote before, anyone who feels like it, please open a pull-request with the fix. |
cppad_py is an alternative that works with python3; see |
Hi there, as Python 2 did reach end of life quite some time ago, I think it would be a good Idea to support Python 3 from now on forward. (Just to be clear, the current swig wrapper works with 3.11, you just can't do any division.) I went ahead and made the required changes, however due to #42 I had to make some more changes to the build system that are possibly a little hackish. My changes can be found in 7b0078e . Best, |
Hi Stefan, thanks a lot for your comment!! We also found some issues with the build system. I will try to integrate them within the next two weeks. It would be great if you could provide a test case after that. Best regards Andrea |
No problem, if you post it here I'll be notified. FYI: My changes to the build system can be found in https://github.com/cklb/ADOL-C/tree/makepkg |
Hi Stefan, I just tried to adapt the build system correspondingly. However, I was not completely successful. Could we discuss these issue to fix it? That would be great. Best regards Andrea |
Hey, a few weeks ago, a colleague of mine made some changes to get the build running again. I don't think that he is on Github by luckily he collected his changes (based on the 2.7.2 release) in form of a patch and provided a package for the archlinux user repository which you can find here: https://aur.archlinux.org/packages/python-adolc. Best, |
Hey, thanks a lot for the patch. It should be included now in the master branch. However, the installation does not work on my system. It would be great if you could give it a try to check whether it works on your system? That might help to identify the reason. Thanks and best regards Andrea |
Hey, it seems like one line of the patch did not get included on the master branch, it is the line 217 in ADOL-C/swig/setup.py:
without that change, the packaging module gives However, after applying that line a myriad of similar compile errors arise from the wrapper class.
I think the problem here is that the patch is based on the last available tagged version of ADOL-C (https://github.com/coin-or/ADOL-C/releases/tag/releases%2F2.7.2) and in the meantime changes were made to the C++ code that did not get ported to the swig wrapper, possibly because no one was using the python extension. The build commands I used are
Best, |
Hi, oK, this is the same behaviour that I observe. I will try to trace down the reason for this and to fix the interface definition. Best regards Andrea |
With python3.12 the numpy.distutils package is no longer available; see But it is used by adolc's python setup.py file; see
in |
I notice in you swig interface code
https://github.com/coin-or/ADOL-C/blob/master/ADOL-C/swig/adolc-python.i
at line number 442
This no longer works in python3; see
https://stackoverflow.com/questions/34344025/have-the-rdiv-and-idiv-operators-changed-in-python-3-x
The text was updated successfully, but these errors were encountered: