I am creating a package that uses Cython to compile some PYX files. The issue, is that the PYX files references another project. So in the setup.py, I have 2 issues:
- Need to run Cython
- Need to parse the path where the other library is installed to reference the PYX file
I thought about using pyproject.toml, and add the cython, and the other project as requires. That seems to be working quite well, the build process now runs on an isolated environment. So if I have already installed the library and Cython, it won’t use those but install a new ones.
If I choose not to run pip on an isolated environment, and Cython and the other libraries aren’t installed, the setup.py will raise an exception because it can’t import any of those.
At the end, I had some issues because the PYX used to compile the project wasn’t the one on the systempath I had, so there was an error.
Is there an option on the pyproject.toml requires to check if the dependency is already installed, and in that case use it. If not, install a new one? I wasn’t able to find anything like that.