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

Fix tiledb-py-feedstock setup job after migration to numpy 2 #142

Merged
merged 2 commits into from
Sep 14, 2024
Merged
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
13 changes: 10 additions & 3 deletions scripts/tiledb-py/update-recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
recipe = "tiledb-py-feedstock/recipe/meta.yaml"
conda_build_config = "tiledb-py-feedstock/recipe/conda_build_config.yaml"

import os
from ruamel.yaml import YAML
from yaml.constructor import ConstructorError
from yaml.scanner import ScannerError
Expand Down Expand Up @@ -77,7 +78,7 @@

with open("tiledb-py-feedstock/recipe/bld.bat", "w") as f:
f.write(
f"set \"TILEDB_PATH=%LIBRARY_PREFIX%\" "
f'set "TILEDB_PATH=%LIBRARY_PREFIX%" '
"&& %PYTHON% -m pip install "
f"-Cskbuild.cmake.define.TILEDB_REMOVE_DEPRECATIONS={remove_deprecations_value} "
"--no-build-isolation --no-deps --ignore-installed -v ."
Expand All @@ -94,9 +95,15 @@
#
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml

config["python"] = ["3.8.* *_cpython", "3.12.* *_cpython"]
config["python"] = ["3.9.* *_cpython", "3.12.* *_cpython"]
config["python_impl"] = ["cpython", "cpython"]
config["numpy"] = [1.22, 1.26]
config["numpy"] = ["2.0", "2.0"]

with open(conda_build_config, "w") as f:
yaml.dump(config, f)

# Have to remove numpy2 migration file to rerender with subset of Python
# variants
numpy2_migration = "tiledb-py-feedstock/.ci_support/migrations/numpy2.yaml"
if os.path.isfile(numpy2_migration):
os.remove(numpy2_migration)