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 #67

Merged
merged 32 commits into from
Jun 30, 2019
Merged

Python 3 support #67

merged 32 commits into from
Jun 30, 2019

Conversation

tkralphs
Copy link
Member

@tkralphs tkralphs commented Mar 22, 2019

This is an update of #28. I re-generated the Cython files with Cython 0.23.3 (which seems to be the last version used by @jjhelmus). I can build and install. I get an error Ican't interpret with the most recent version of Cython (0.29.6). Unfortunately, I'm not an expert on Python 3 or Cython. I'll continue to debug, but if anyone wants to grab this and try their luck, I thought I would throw it out there. I'm also getting some deprecation warnings and a few other strange errors when testing, although thing seems to be working for the most part.

jjhelmus and others added 23 commits October 2, 2015 10:56
Python 3 does not differentiate betten int and long so the PyInt_
functions must be replaced with PyLong_.

Macros from cx_Oracle project.
The izip function fron itertools was removed from Python 3, use of zip is
recommended.
TypeError and NotImplementedError are build ins
long was removed in Python 3, use int in its place.
The build in reduce function was removed in Python 3 and must be imported
from functools.
Due to the different methods that Python 2 and 3 represent strings
it is necessary to encode the filename passed to the readMps function
which can then be converted into a char* pointer for use in C.

Since strings do not share a type in Python 2 and 3 the filename argument
of the readMps function must not be typed.
This may break the bdist_mpkg and bdist_wininst commands
@tkralphs
Copy link
Member Author

I posted a beta version with Python 3 support to Pypi:

pip install --pre cylp

There is a binary wheel for Windows, but you still need to build Cbc before installing on Linux and OS X.

@tkralphs
Copy link
Member Author

I seem to have figured out the bug that prevented this from building with Cython 0.29. I re-generated the files once again and pushed a binary wheel up for Python 3.7 on Windows.

@tkralphs
Copy link
Member Author

Thanks for the PR. In testing, I found a bug that arises with recent versions of SciPy. I fixed that and am now merging to master. There are still some outstanding bugs that should be fixed, but these can be fixed in master and don't affect use in most cases.

@tkralphs tkralphs merged commit 9f3d6bc into coin-or:master Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants