-
Notifications
You must be signed in to change notification settings - Fork 10
Implementing the meson-python
build backend
#94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
debug linux CI build debug linux windows build debug linux macOS build
test anaconda mesonpy build on windows don't update conda in CI, gets updated after mamba install try debug anaconda windows build according to scipy
edit windows conda workflow edit windows conda GH workflow test conda build on macOS test Python 3.9, 3.10, 3.11 on Windows anaconda build test macOS Anaconda build for Py 3.9-3.11
@bgoli Any chance of a review before Christmas or are you already on leave? |
@bgoli Have you had a chance to look at this? I would like to cut a new release. |
@bgoli I'd really like to cut a release soon. We need the new version for a course we're teaching. Have you had a chance to look at this? |
Sorry about the delay I'm looking at it now, should be finished tomorrow.
…On Mon, Jan 15, 2024, 11:14 Johann Rohwer ***@***.***> wrote:
@bgoli <https://github.com/bgoli> Have you had a chance to look at this?
I would like to cut a new release.
—
Reply to this email directly, view it on GitHub
<#94 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGHUELGXH4TXY67O43YCV3YOT6PZAVCNFSM6AAAAABAWD5SGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRG44TQMZWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…reaks and backward compatability but is worth the change to support only vectorized numpy functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, added a tweak to remove the math. parsing but other than that all looks good to go.
This PR implements meson-python, a PEP 517 compliant Python build backend that is suitable for building C and Fortran extension modules by implementing the meson build system. There is no more
setup.py
but project build options and metadata are now inpyproject.toml
.These changes are substantial, thus a version bump to 1.2.0 is proposed.
Current status (prior to this PR)
PySCeS is built with the
scikit-build
system making use of asetup.py
file. Under the hood, scikit-build makes use ofcmake
to build extension modules, and in our case these (Fortran) modulesnleq2
andpitcon
are compiled withf2py -c
. The flow is thus:scikit-build
callscmake
callsf2py -c
.The compilation via
f2py -c
occurs vianumpy.distutils
(Python <=3.11) ormeson
(Python >=3.12) due to the deprecation ofdistutils
andnumpy.distutils
, and thus differs between Python versions.Motivation
distutils
and as a consequence numpy removednp.distutils
. This was the motivation for originally moving the build toscikit-build
in PySCeS release 1.0.3 (Sep 2022) and move away from a directnp.distutils
implementation.f2py -c
calls meson via cmake but since meson is used for the build, it could be called directly and the whole cmake infrastructure is actually not needed.f2py -c
uses different backends depending on Python version, which increases complexity.np.distutils
used to have a hack to combineMSVC
(for compiling C) withgfortran
(for compiling Fortran). This is however no longer supported from Python 3.12 onwards.f2py -c
does not work on Windows with meson (Python 3.12) numpy/numpy#25000f2py -c
should not be used at all in the context of build systems such as scikit-build or meson-python, but should only be used as a transpiler to generate*.c
sources which are then integrated into regular CMake or meson targets for the build. See BUG: f2py compile error with full path of signature file on Windows numpy/numpy#22211 (comment)mingw32
) of preferring build of statically linked libraries, which gets rid of linking issues.What has changed?
pip
orconda
.setup.py
. Metadata has been migrated topyproject.toml
. Build settings are spread betweenpyproject.toml
and variousmeson.build
files. The build is straightforward using one of:pip install .
orpip install --no-build-isolation -e .
(for an editable install).Refer to INSTALL.md