manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

Custom compiler instruction for pip does not work #284

Closed misharash closed 1 year ago

misharash commented 1 year ago

General information

Issue description

When I run python -m pip install . CC=/opt/homebrew/opt/llvm/bin/clang --user in the code directory as suggested in README, an error appears.

Expected behavior

Code builds

Actual behavior

ERROR: Invalid requirement: 'CC=/opt/homebrew/opt/llvm/bin/clang'
Hint: It looks like a path. File 'CC=/opt/homebrew/opt/llvm/bin/clang' does not exist.

What have you tried so far?

Setting CC := /opt/homebrew/opt/llvm/bin/clang in common.mk helps, then python -m pip install . --user works.

Minimal failing example

python -m pip install . CC=/anypath

manodeep commented 1 year ago

@misharash Thanks for the report. The syntax you are using works if you install with python setup.py install .... If you install with pip, then you have to use the syntax python -m pip install --install-option="CC=/opt/homebrew/opt/llvm/bin/clang" .... This should fix the issue you are seeing

manodeep commented 1 year ago

Closing since the issue should be for you @misharash. Please feel free to re-open if you need further help