diff --git a/.ci_support/migrations/pari217.yaml b/.ci_support/migrations/pari217.yaml deleted file mode 100644 index 995abe7..0000000 --- a/.ci_support/migrations/pari217.yaml +++ /dev/null @@ -1,8 +0,0 @@ -__migrator: - build_number: 1 - commit_message: Rebuild for pari 2.17 - kind: version - migration_number: 1 -migrator_ts: 1737362670.5243793 -pari: -- '2.17' diff --git a/.gitignore b/.gitignore index 179afe5..47b5408 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,8 @@ /build_artifacts *.pyc + +# Rattler-build's artifacts are in `output` when not specifying anything. +/output +# Pixi's configuration +.pixi diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 00f377a..6ee04aa 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -12,7 +12,7 @@ source .scripts/logging_utils.sh set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" +PROVIDER_DIR="$(basename "$THISDIR")" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" diff --git a/build-locally.py b/build-locally.py index c4a56c6..02c2374 100755 --- a/build-locally.py +++ b/build-locally.py @@ -10,6 +10,7 @@ import os import platform import subprocess +import sys from argparse import ArgumentParser @@ -44,10 +45,19 @@ def run_osx_build(ns): subprocess.check_call([script]) +def run_win_build(ns): + script = ".scripts/run_win_build.bat" + subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"]) + + def verify_config(ns): + choices_filter = ns.filter or "*" valid_configs = { - os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + os.path.basename(f)[:-5] + for f in glob.glob(f".ci_support/{choices_filter}.yaml") } + if choices_filter != "*": + print(f"filtering for '{choices_filter}.yaml' configs") print(f"valid configs are {valid_configs}") if ns.config in valid_configs: print("Using " + ns.config + " configuration") @@ -60,30 +70,37 @@ def verify_config(ns): selections = list(enumerate(sorted(valid_configs), 1)) for i, c in selections: print(f"{i}. {c}") - s = input("\n> ") + try: + s = input("\n> ") + except KeyboardInterrupt: + print("\nno option selected, bye!", file=sys.stderr) + sys.exit(1) idx = int(s) - 1 ns.config = selections[idx][1] print(f"selected {ns.config}") else: raise ValueError("config " + ns.config + " is not valid") - # Remove the following, as implemented - if ns.config.startswith("win"): - raise ValueError( - f"only Linux/macOS configs currently supported, got {ns.config}" + if ( + ns.config.startswith("osx") + and platform.system() == "Darwin" + and not os.environ.get("OSX_SDK_DIR") + ): + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) - elif ns.config.startswith("osx"): - if "OSX_SDK_DIR" not in os.environ: - raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " - "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " - "Note: OSX_SDK_DIR must be set to an absolute path. " - "Setting this variable implies agreement to the licensing terms of the SDK by Apple." - ) def main(args=None): p = ArgumentParser("build-locally") p.add_argument("config", default=None, nargs="?") + p.add_argument( + "--filter", + default=None, + help="Glob string to filter which build choices are presented in interactive mode.", + ) p.add_argument( "--debug", action="store_true", @@ -104,6 +121,8 @@ def main(args=None): run_docker_build(ns) elif ns.config.startswith("osx"): run_osx_build(ns) + elif ns.config.startswith("win"): + run_win_build(ns) finally: recipe_license_file = os.path.join( "recipe", "recipe-scripts-license.txt" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index fadb66d..8dea514 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "2.2.1" %} +{% set version = "2.2.2" %} {% set name = "cypari2" %} package: @@ -7,10 +7,10 @@ package: source: url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: aaa017a6a280581902f73cf5ce1695712b6598a032be14cfab81f97c475f83b8 + sha256: 13a338735ea221c1068f8fc415561bf777d8c68725702bc749547264fd091720 build: - number: 1 + number: 0 # cypari2 is generally compatible with Python 3.8 (but 2.1.3 and 2.1.4 have problems with that Python.) skip: true # [win or py<39] script: @@ -35,7 +35,7 @@ requirements: run: - python - {{ pin_compatible('pari', max_pin='x.x') }} - - cysignals + - cysignals >=1.11.3 - gmp test: