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

python3 setup.py define JEP_NUMPY_ENABLED=1 but build via pip3 defines it disabled JEP_NUMPY_ENABLED=0 #580

Open
maveric2 opened this issue Dec 13, 2024 · 5 comments

Comments

@maveric2
Copy link

If I build jep with python3 setup.py the jep NumPy support gets enabled (-DJEP_NUMPY_ENABLED=1).
If I build it via pip3 jep-4.2.1.tar.gz the compile defines is not enabled (-DJEP_NUMPY_ENABLED=0).

How to enable NumPy support using pip?

@bsteffensmeier
Copy link
Member

Try using the --no-cache-dir option with pip.

@maveric2
Copy link
Author

unfortunately this has no effect, still -DJEP_NUMPY_ENABLED=0

@bsteffensmeier
Copy link
Member

bsteffensmeier commented Dec 13, 2024

pip seems to be building jep in an environment where numpy is not available. Try using the --no-build-isolation option should build it in your normal python environment where numpy is available.

@maveric2
Copy link
Author

pip3 -v install --no-build-isolation --no-binary :all: .

unfortunately not ;-(

error: invalid command 'bdist_wheel'
  error: subprocess-exited-with-error
  
  �� Preparing metadata (pyproject.toml) did not run successfully.
  ��� exit code: 1
  ������> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/jenkins/jenkins_slave/workspace/Python3_pip-linux64/python/bin/python3.11 /home/jenkins/jenkins_slave/workspace/Python3_pip-linux64/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpm9xseg4_
  cwd: /home/jenkins/jenkins_slave/workspace/Python3_pip-linux64/jep-4.2.1
  Preparing metadata (pyproject.toml): finished with status 'error'
error: metadata-generation-failed

@bsteffensmeier
Copy link
Member

I think you need to pip install wheel before installing jep. When pip sets up the build isolation I think it includes wheel in the environment for you but without the isolation you have to manually install wheel. Unfortunately I can't find anyway to just skip the wheel step and install directly with pip.

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

No branches or pull requests

2 participants