I'm using VS-Code on Windows-10 for python 3.11 development. When I try 'pip install rebound', cl.exe throws "D8021: invalid numeric argument '/Wno-unknown-pragmas'". Other posts say the Intel and gcc compilers accept that flag. Should cl.exe be upgraded to deal with it too?
I found the flag in rebound's setup.py. I edited that script to eliminate the flag, but somehow it STILL shows up in the build transcript when 'pip install rebound' runs. How is MY modified setup.py getting ignored? Is the flag actually coming from somewhere else? How can I suppress generation of that compiler flag or maybe convince VS-Code to use gcc instead? What's the best workaround?
For reference, the build transcript follows here...
$ pip install rebound
Collecting rebound
Using cached rebound-3.25.1.tar.gz (296 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: rebound
Building wheel for rebound (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for rebound (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\rebound
copying rebound\citations.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\data.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\horizons.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\interruptible_pool.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\particle.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\plotting.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\simulation.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\simulationarchive.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\tools.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\units.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\widget.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\__init__.py -> build\lib.win-amd64-cpython-311\rebound
copying rebound\rebound.h -> build\lib.win-amd64-cpython-311\rebound
running build_ext
building 'librebound' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -IC:\Programs\Python311\include -IC:\Programs\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcsrc/binarydiff.c /Fobuild\temp.win-amd64-cpython-311\Release\src/binarydiff.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=2a8f0c05527e195cc83a1bc8b0a439b0bf2a4192 -DLIBREBOUND -D_GNU_SOURCE -fPIC
cl : Command line error D8021 : invalid numeric argument '/Wno-unknown-pragmas'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for rebound
Failed to build rebound
ERROR: Could not build wheels for rebound, which is required to install pyproject.toml-based projects