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

Test building PyPy wheel on CI #616

Merged
merged 3 commits into from
Sep 2, 2021
Merged

Test building PyPy wheel on CI #616

merged 3 commits into from
Sep 2, 2021

Conversation

messense
Copy link
Member

@messense messense commented Sep 2, 2021

Part of #115

@messense
Copy link
Member Author

messense commented Sep 2, 2021

Odd, it works on linux and Windows but fails to import on macOS.

Traceback:
../../../hostedtoolcache/PyPy/3.7.10/x64/lib-python/3/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test-crates/pyo3-mixed-submodule/tests/test_pyo3_mixed_submodule.py:3: in <module>
    import pyo3_mixed_submodule
../../../hostedtoolcache/PyPy/3.7.10/x64/site-packages/pyo3_mixed_submodule/__init__.py:2: in <module>
    from .rust_module.rust import get_21
E   ImportError: dlopen(/Users/runner/hostedtoolcache/PyPy/3.7.10/x64/site-packages/pyo3_mixed_submodule/rust_module/rust.pypy37-pp73-darwin.so, 6): Symbol not found: _PyExc_AttributeError
E     Referenced from: /Users/runner/hostedtoolcache/PyPy/3.7.10/x64/site-packages/pyo3_mixed_submodule/rust_module/rust.pypy37-pp73-darwin.so
E     Expected in: flat namespace
E    in /Users/runner/hostedtoolcache/PyPy/3.7.10/x64/site-packages/pyo3_mixed_submodule/rust_module/rust.pypy37-pp73-darwin.so

@davidhewitt Any insight?

@davidhewitt
Copy link
Member

I think that looks like the sort of error to expect if PyO3 configured itself against CPython but the wheel is being imported by PyPy... 🤔

@messense
Copy link
Member Author

messense commented Sep 2, 2021

Right.

on Windows it passes --cfg Py_3_6 --cfg Py_3_7 --cfg PyPy --cfg "py_sys_config=\"WITH_THREAD\"" --cfg min_const_generics --cfg addr_of
on macOS it passes --cfg Py_3_6 --cfg Py_3_7 --cfg Py_3_8 --cfg 'py_sys_config="WITH_THREAD"' --cfg min_const_generics --cfg addr_of which misses the --cfg PyPy argument.

@messense messense merged commit 5ff228e into PyO3:main Sep 2, 2021
@messense messense deleted the test-pypy branch September 2, 2021 09:08
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