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

Migration to pyproject #26

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Sparks29032
Copy link

Issue relating to GIL related to subtype_dealloc of a CovalentRadiiTable object. Still looking into exactly where. While looking for the error, I made a few changes to the source and build code.

  • Fix an error due to numpy update (numpy.complex128)
  • Remove deprecated pkgutils and numpy.distutils usage
  • Move as much of setup.py to pyproject.toml as possible (extensions must remain in setup.py)

Build has been tested on the GCP (works and pytest tests pass for 3.9+ disregarding the GIL issues). Some instructions on common errors have been written to the group wiki.

@artsiommiksiuk
Copy link

I have an issue with installation. It says no module found "numpy" on install, if using venv (numpy is installed actually). Does this PR solves it?

@Sparks29032
Copy link
Author

Sparks29032 commented Jun 4, 2024

I have an issue with installation. It says no module found "numpy" on install, if using venv (numpy is installed actually). Does this PR solves it?

No, this update fixes errors with build. It is possible if you are using the new Mac chips that this program is not currently compatible. Othsrwise, check that your numpy is installed with the correct python binary (python -m pip install numpy) and that your installed NumPy package directory is part of the PYTHONPATH.

@artsiommiksiuk
Copy link

artsiommiksiuk commented Jun 20, 2024

Were you able to identify the GIL issue? I've build this lib for own use case and for python 3.10.14. I had to build latest build for it specifically and rebuild libdiffpy as well. It's running now on latest macos for me but I'm also faicing this issue:

Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)

Interesting enough, following your lead of that this is caused by CovalentRadiiTable, and commenting it out GIL issue is gone. I can't for now as well figure out what's the cause, but maybe you already have, or can share some of your findings?

@Sparks29032
Copy link
Author

Unfortunately, this is where I am stuck too. I will report any findings to this thread, and feel free to do so as well if you find anything new. Hope to get this resolved together!

@Sparks29032 Sparks29032 changed the title Migration to pyproject.toml Fixing GIL Issue Jun 20, 2024
@pavoljuhas
Copy link
Member

Please see #28 for the Python GIL error fix.

@Sparks29032 Sparks29032 changed the title Fixing GIL Issue Migration to pyproject Aug 20, 2024
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