symengine / symengine-wheels

BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

The provided wheels faultily report to be pure Python #16

Open mrossinek opened 5 months ago

mrossinek commented 5 months ago

I would like to raise the issue https://github.com/symengine/symengine.py/issues/474 to this repo because I believe that the fix for this requires some changes to how the Python wheels are built.

There is a lot in that discussion so let me try to summarize the key points:

The symengine wheels report as pure Python, although they are not, which I believe has to be fixed for this issue to be resolved. Unfortunately, I do not have the expertise to fix this in the build system of symengine but maybe the maintainers of this repository could help with that.

I see that there have been efforts in the past to part the build setup to scikit-build, which might prove to be a good path forward:

Cc @martinruefenacht

jlapeyre commented 3 months ago

bump?

garrison commented 2 months ago

This bug is commonly encountered when using symengine on Fedora-based systems (including RHEL), under virtualenv or tox (which uses virtualenv under the hood, I have heard). The below Dockerfile shows how simple it is to reproduce, and it makes symengine impossible to uses under these circumstances.

FROM fedora:40
RUN dnf install -y pip
RUN pip install virtualenv
RUN virtualenv myenv
RUN ./myenv/bin/pip install symengine
RUN ./myenv/bin/python -c 'import symengine'

This test case can be reproduced by installing docker, placing the above text in a Dockerfile in its own directory, and running docker build . from that directory.

STEP 6/6: RUN ./myenv/bin/python -c 'import symengine'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "//myenv/lib/python3.12/site-packages/symengine/__init__.py", line 12, in <module>
    import symengine.lib.symengine_wrapper as wrapper
ModuleNotFoundError: No module named 'symengine.lib.symengine_wrapper'
Error: building at STEP "RUN ./myenv/bin/python -c 'import symengine'": while running runtime: exit status 1
isuruf commented 2 months ago

Switching to scikit-build would be the best way forward