Implementing the meson-python build backend#94
Merged
Merged
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
Member
Author
|
@bgoli Any chance of a review before Christmas or are you already on leave? |
Member
Author
|
@bgoli Have you had a chance to look at this? I would like to cut a new release. |
Member
Author
|
@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? |
Member
|
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.
bgoli
approved these changes
Feb 12, 2024
Member
bgoli
left a comment
There was a problem hiding this comment.
Hi, added a tweak to remove the math. parsing but other than that all looks good to go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pybut 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-buildsystem making use of asetup.pyfile. Under the hood, scikit-build makes use ofcmaketo build extension modules, and in our case these (Fortran) modulesnleq2andpitconare compiled withf2py -c. The flow is thus:scikit-buildcallscmakecallsf2py -c.The compilation via
f2py -coccurs vianumpy.distutils(Python <=3.11) ormeson(Python >=3.12) due to the deprecation ofdistutilsandnumpy.distutils, and thus differs between Python versions.Motivation
distutilsand as a consequence numpy removednp.distutils. This was the motivation for originally moving the build toscikit-buildin PySCeS release 1.0.3 (Sep 2022) and move away from a directnp.distutilsimplementation.f2py -ccalls 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 -cuses different backends depending on Python version, which increases complexity.np.distutilsused 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 -cdoes not work on Windows with meson (Python 3.12) numpy/numpy#25000f2py -cshould 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*.csources 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?
piporconda.setup.py. Metadata has been migrated topyproject.toml. Build settings are spread betweenpyproject.tomland variousmeson.buildfiles. The build is straightforward using one of:pip install .orpip install --no-build-isolation -e .(for an editable install).Refer to INSTALL.md