pyoptsparse icon indicating copy to clipboard operation
pyoptsparse copied to clipboard

Support `pyproject.toml`

Open ewu63 opened this issue 4 years ago • 0 comments

Description

The file pyproject.toml is a PEP-compliant way of specifying build tools, which gets around the problem of needing numpy to build pyoptsparse but pip won't know until it runs setup.py which will then error out because you don't have numpy.... This is also why most tools will just install/inject setuptools by default just because that's what most packages implicitly depend on.

However, there are some unresolved issues, namely that the version used to build pyoptsparse has to match the version running pyoptsparse, and if there are inconsistencies then all sorts of things will break. I'm not entirely sure what's going on, but a naive first-try did not work. This might also have something to do with the fact that if pip detects pyproject.toml then it tries to run in isolated mode, whatever that means. If we can figure this out, then we can throw away all the nasty try/except statements in the setup.py file itself.

ewu63 avatar Apr 03 '21 17:04 ewu63