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

Add win32 support #9

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

Conversation

jlmuir
Copy link
Contributor

@jlmuir jlmuir commented Sep 19, 2018

Make adPython work on Windows.

Change how adPython calls into the embedded Python to use
PyGILState_Ensure() and PyGILState_Release() which is appropriate for
calling from non-Python-created threads which is the case for adPython
which is called from areaDetector-created threads. Without this change,
adPython hangs on Windows. The Python calling idiom is documented in
the following:

Install the plugin scripts so that adPython can reference an installed
pathname rather than a source pathname.

Remove the automatic determination of the Python version, include
pathnames, library pathnames, etc. by executing external commands from
Make since it did not work on Windows. Replace that with explicit
definitions in configure/CONFIG_SITE.

Make adPython work on Windows.

Change how adPython calls into the embedded Python to use
PyGILState_Ensure() and PyGILState_Release() which is appropriate for
calling from non-Python-created threads which is the case for adPython
which is called from areaDetector-created threads.  Without this change,
adPython hangs on Windows.  The Python calling idiom is documented in
the following:

* https://docs.python.org/2/c-api/init.html#non-python-created-threads
* https://stackoverflow.com/a/4975906
* https://bugs.python.org/issue1720250#msg57619

Install the plugin scripts so that adPython can reference an installed
pathname rather than a source pathname.

Remove the automatic determination of the Python version, include
pathnames, library pathnames, etc. by executing external commands from
Make since it did not work on Windows.  Replace that with explicit
definitions in configure/CONFIG_SITE.
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