Skip to content
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

Lift meson cap, remove conda-build work-arounds #398

Merged
merged 5 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .ci_support/linux_64_numpy1.22python3.9.____73_pypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ c_compiler_version:
c_stdlib:
- sysroot
c_stdlib_version:
- '2.12'
- '2.17'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_64_numpy2.0python3.10.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ c_compiler_version:
c_stdlib:
- sysroot
c_stdlib_version:
- '2.12'
- '2.17'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_64_numpy2.0python3.11.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ c_compiler_version:
c_stdlib:
- sysroot
c_stdlib_version:
- '2.12'
- '2.17'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_64_numpy2.0python3.12.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ c_compiler_version:
c_stdlib:
- sysroot
c_stdlib_version:
- '2.12'
- '2.17'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_64_numpy2.0python3.9.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ c_compiler_version:
c_stdlib:
- sysroot
c_stdlib_version:
- '2.12'
- '2.17'
cdt_name:
- cos6
- cos7
channel_sources:
- conda-forge
channel_targets:
Expand Down
10 changes: 8 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build-locally.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions recipe/build_base.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

set -ex

export AR=$GCC_AR
Expand All @@ -8,9 +7,14 @@ export AR=$GCC_AR
export MESON_ARGS="${MESON_ARGS} --pkg-config-path=${PREFIX}/lib/pkgconfig"
export MESON_ARGS="${MESON_ARGS} -Dsystem-freetype=true -Dsystem-qhull=true"

mkdir builddir
$PYTHON -m mesonbuild.mesonmain setup builddir $MESON_ARGS
cat builddir/meson-logs/meson-log.txt
$PYTHON -m build --wheel \
--no-isolation --skip-dependency-check -Cbuilddir=builddir
# meson-python already sets up a -Dbuildtype=release argument to meson, so
# we need to strip --buildtype out of MESON_ARGS or fail due to redundancy
MESON_ARGS_REDUCED="$(echo $MESON_ARGS | sed 's/--buildtype release //g')"
Comment on lines +10 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an issue tracking removing this flag from MESON_ARGS upstream?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's their default. Our compilers need to change, and they did as of clang 17 / GCC 13

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant raise a conda-forge issue, but it sounds like that already was fixed. Do you have a link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two links in my comment...? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oops. Sorry was on my phone, which didn't make this clear. Thanks!


# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
$PYTHON -m build -w -n -x \
-Cbuilddir=builddir \
-Csetup-args=${MESON_ARGS_REDUCED// / -Csetup-args=} \
|| (cat builddir/meson-logs/meson-log.txt && exit 1)

$PYTHON -m pip install --find-links dist matplotlib
16 changes: 1 addition & 15 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source:
sha256: 4fdf46dc325fdf4cbc61f7fa66de7b48287df0a71b3442b63ff0784041cae2e7

build:
number: 0
number: 1
skip: true # [py<39]

# to avoid creating redundant CI jobs, conda-smithy needs python
Expand All @@ -28,18 +28,6 @@ outputs:
build:
ignore_run_exports_from:
- zlib
# work around https://github.com/conda/conda-build/issues/5403
missing_dso_whitelist: # [ppc64le]
- $RPATH/ld64.so.2 # [ppc64le]
script_env:
# Workaround an upstream conda-build issue w/pip & `outputs` by setting env vars manually.
# Drop once conda-build 24.7.0 is released.
# xref: https://github.com/conda/conda-build/issues/3993
- PIP_NO_BUILD_ISOLATION=False
- PIP_NO_DEPENDENCIES=True
- PIP_IGNORE_INSTALLED=True
- PIP_CACHE_DIR=pip_cache
- PIP_NO_INDEX=True
requirements:
build:
- python # [build_platform != target_platform]
Expand All @@ -58,8 +46,6 @@ outputs:
- python-build
- pip
- meson-python >=0.13.1
# work-around for https://github.com/mesonbuild/meson/issues/13403
- meson <1.5 # [osx and arm64]
- certifi >=2020.06.20
- pybind11 >=2.6
- freetype
Expand Down