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

Fix extension build #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix extension build #17

wants to merge 2 commits into from

Conversation

MarkKoz
Copy link

@MarkKoz MarkKoz commented Aug 8, 2021

I was getting errors installing this package on Python 3.9 on Windows:

stl_tools\cwrapped.c(19405): error C2039: 'exc_type': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19406): error C2039: 'exc_value': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19407): error C2039: 'exc_traceback': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19408): error C2039: 'exc_type': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19409): error C2039: 'exc_value': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19410): error C2039: 'exc_traceback': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19444): error C2039: 'exc_type': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19445): error C2039: 'exc_value': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19446): error C2039: 'exc_traceback': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19458): error C2039: 'exc_type': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19459): error C2039: 'exc_value': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19460): error C2039: 'exc_traceback': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19461): error C2039: 'exc_type': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19462): error C2039: 'exc_value': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'
stl_tools\cwrapped.c(19463): error C2039: 'exc_traceback': is not a member of '_ts'
cpython/pystate.h(51): note: see declaration of '_ts'

To fix this, I deleted the checked-in C file and modified setup.py to invoke Cython to build it all from scratch. This relies on setuptools >= 18.0 for proper Cython support. Other than that, I don't believe there are any potentially backwards-incompatible changes. I have not tested this on old versions like 2.7 and 3.2 like the readme mentions.

I also fixed the specification of build dependencies. It will now automatically install numpy and cython before installing the package. Furthermore, all dependencies have minimum versions specified in accordance with the readme. Technically, matplotlib should be less than version 3.3.0 since that's when the warn kwarg of matplotlib.use was removed. I didn't restrict it to that since there's already a PR open to remove that kwarg anyway (#16).

MarkKoz added 2 commits August 8, 2021 14:26
This relies on setuptools >= 18.0 for proper Cython support.
@macromaniac
Copy link

macromaniac commented Dec 31, 2021

Thanks, this worked for me in combination with PR#16

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.

2 participants