Commit e7011790 authored by Oskar Skog's avatar Oskar Skog

Workaround for PyPy on OpenBSD, there are no site-packages nor dist-packages

directory in sys.path
parent 97cc3580
......@@ -3,6 +3,8 @@
* anonymine_engine.py: Use SIGTERM instead of SIGCONT to kill workers.
* anonymine.py: Ignore SIGTSTP due to curses issues.
BUG: The above change was specifically made to allow pausing.
* configure.py: Workaround for PyPy on OpenBSD, there are no
site-packages nor dist-packages directory in sys.path.
2018-10-10 Oskar Skog <https://oskog97.com/#contact>
0.5.4
......
......@@ -413,10 +413,18 @@ def find_MODULES(Makefile, flags):
Makefile['MODULES'] = paths[0]
return False
# PyPy on OpenBSD lacks a proper location
if sys.executable == expand('bindir', Makefile) + '/pypy':
pypypath = '/pypy/lib-python/{0}.{1}'.format(*sys.version_info[:1])
if expand('prefix', Makefile) + pypypath in sys.path:
Makefile['MODULES'] = '$(prefix)' + pypypath
sys.stderr.write("WARNING: No site-packages or dist-packages "
"found for PyPy.\n")
return False
sys.stderr.write("Can't find directory for Python modules\n")
return True
def find_INSTALL(Makefile, flags):
'''
See the doc-string for find_prefix as well.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment