Closed astrojuanlu closed 1 year ago
Well, that was surprisingly easy! I modified both CMakeLists.txt
files to not use PYGMO_INSTALL_PATH
and use a relative directory instead. Arguably some functionality got lost, but now at least both pip install .
and python -m build
work 🎉
What's left is
pagmo2
@bluescarni @darioizzo this is ready for review.
The CI failures are caused by an import error because of the current working directory. Fixing.
There are 5 remaining test failures:
NotImplementedError: pool objects cannot be passed between processes or pickled
ModuleNotFoundError: No module named '__builtin__'
These are not present in These are also present in master
, so clearly are due to this PR, but it's still not entirely clear to me what might be causing them.master
at the moment, see gh-114.
just FYI, I am getting the same errors in the build on PR #112 despite it building and running the tests fine on my machine. I'm also in the dark as to what is causing the issue
@astrojuanlu Thanks for taking the time to look into this.
As a general comment, the scikit approach should be an alternative to the CMake build sytem and not a replacement for it. Thus, I would ask if you could place the scikit instructions in a new paragraph in the docs, rather than modifying the existing CMake instructions.
Similarly, the existing conda based builds in the CI pipeline should remain unaltered and new builds testing the scikit approach should be added instead (preferably on github actions, as I think we may be hitting the limits for open source projects on other CI providers).
I'll leave a couple more comments on the diff.
closing this #117 substitutes it up to when we will consider again scikit-build-core
This attempts to use scikit-build to build pygmo in an effort to simplify gh-110. For that, I copied
tools/wheel_setup.py
tosetup.py
and made some minimal modifications.I got surprisingly far with comparatively low effort, although the PR is not finished yet:
setup.py
. With the old process CMake takes care of configuring that - I'm wondering if we could do the same using scikit-build.PYGMO_INSTALL_PATH
so thatpip install .
works on the environment I was using, but using this absolute path is brittle. I am investigating whether a more generic solution can be implemented.I tested this in a conda environment with the released version of pagmo, which means that I had to temporarily revert 97770b25c4769039dd75ec78bd9b05df3f1aac13. However, I am confident it will work with development versions of pagmo as well.