diff --git a/recipes/pyiceberg-core/build.bat b/recipes/pyiceberg-core/build.bat new file mode 100644 index 0000000000000..4ac8fc9e6ea84 --- /dev/null +++ b/recipes/pyiceberg-core/build.bat @@ -0,0 +1,15 @@ +@echo on +set "PYO3_PYTHON=%PYTHON%" + +set CARGO_PROFILE_RELEASE_STRIP=symbols +set CARGO_PROFILE_RELEASE_LTO=fat + +set "CMAKE_GENERATOR=NMake Makefiles" +maturin build -v --jobs 1 --release --strip --manylinux off --interpreter=%PYTHON% --no-default-features || exit 1 + +cd bindings/python + +FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set pyiceberg_core_wheel=%%i +%PYTHON% -m pip install --ignore-installed --no-deps %pyiceberg_core_wheel% -vv || exit 1 + +cargo-bundle-licenses --format yaml --output THIRDPARTY.yml || exit 1 \ No newline at end of file diff --git a/recipes/pyiceberg-core/build.sh b/recipes/pyiceberg-core/build.sh new file mode 100644 index 0000000000000..40115c8b8c072 --- /dev/null +++ b/recipes/pyiceberg-core/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -euxo pipefail + +export CARGO_PROFILE_RELEASE_STRIP=symbols +export CARGO_PROFILE_RELEASE_LTO=fat + +export OPENSSL_DIR=$PREFIX + +# Use native-tls on conda-forge +export MATURIN_PEP517_ARGS="--no-default-features" + +# Run the maturin build via pip which works for direct and +# cross-compiled builds. +$PYTHON -m pip install . -vv + +pushd bindings/python +cargo-bundle-licenses --format yaml --output THIRDPARTY.yml \ No newline at end of file diff --git a/recipes/pyiceberg-core/conda-forge.yml b/recipes/pyiceberg-core/conda-forge.yml new file mode 100644 index 0000000000000..49e875520ce67 --- /dev/null +++ b/recipes/pyiceberg-core/conda-forge.yml @@ -0,0 +1,4 @@ +build_platform: + osx_arm64: osx_64 + linux_aarch64: linux_64 + linux_ppc64le: linux_64 \ No newline at end of file diff --git a/recipes/pyiceberg-core/recipe.yaml b/recipes/pyiceberg-core/recipe.yaml new file mode 100644 index 0000000000000..00d3bbfcd8864 --- /dev/null +++ b/recipes/pyiceberg-core/recipe.yaml @@ -0,0 +1,61 @@ +context: + name: pyiceberg-core + python_name: pyiceberg_core + version: "0.7.0" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.org/packages/source/${{ name[0] }}/${{ name }}/${{ python_name }}-${{ version }}.tar.gz + sha256: 8166883ace30a388d2f659634bec87731cad7bc52341c997fcdd4e13780e4345 + +build: + # only build for the minimal python version + number: 0 + skip: not (match(python, python_min ~ ".*") and is_abi3) + python: + version_independent: true +requirements: + build: + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - maturin >=1.0,<2 + - ${{ compiler('c') }} + - ${{ stdlib("c") }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + host: + - python + - if: is_abi3 + then: python-abi3 + - maturin >=1.2.2,<2 + - pip + run: + - python + +tests: + - python: + imports: + - pyiceberg_core + python_version: + - "${{ python_min }}.*" + - "*" + +about: + homepage: https://github.com/apache/iceberg-rust/ + license: Apache-2.0 + license_file: + - LICENSE + - NOTICE + - bindings/python/THIRDPARTY.yml + summary: | + This project is used to build an iceberg-rust powered core for pyiceberg, and intended for use only by pyiceberg. + repository: https://github.com/apache/iceberg-rust/ + +extra: + recipe-maintainers: + - sumanth-manchala