From ef321e411ec4732e6d172490a8e756f0d24567f5 Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 08:23:18 +0000 Subject: [PATCH 01/23] Add pylance --- recipes/pylance/bld.bat | 19 ++++++++++++++ recipes/pylance/build.sh | 14 ++++++++++ recipes/pylance/meta.yaml | 52 +++++++++++++++++++++++++++++++++++++ recipes/pylance/run_test.py | 7 +++++ 4 files changed, 92 insertions(+) create mode 100644 recipes/pylance/bld.bat create mode 100644 recipes/pylance/build.sh create mode 100644 recipes/pylance/meta.yaml create mode 100644 recipes/pylance/run_test.py diff --git a/recipes/pylance/bld.bat b/recipes/pylance/bld.bat new file mode 100644 index 0000000000000..5efbceb9f7dc5 --- /dev/null +++ b/recipes/pylance/bld.bat @@ -0,0 +1,19 @@ +REM Create temp folder +mkdir tmpbuild_%PY_VER% +set TEMP=%CD%\tmpbuild_%PY_VER% +REM Bundle all downstream library licenses +cd python +cargo-bundle-licenses ^ + --format yaml ^ + --output %SRC_DIR%\THIRDPARTY.yml ^ + || goto :error +REM Use PEP517 to install the package +maturin build --release -i %PYTHON% +REM Install wheel +cd target/wheels +REM set UTF-8 mode by default +chcp 65001 +set PYTHONUTF8=1 +set PYTHONIOENCODING="UTF-8" +set TMPDIR=tmpbuild_%PY_VER% +FOR %%w in (*.whl) DO %PYTHON% -m pip install %%w --no-clean \ No newline at end of file diff --git a/recipes/pylance/build.sh b/recipes/pylance/build.sh new file mode 100644 index 0000000000000..a701ba7235cd7 --- /dev/null +++ b/recipes/pylance/build.sh @@ -0,0 +1,14 @@ +set -ex + +# Bundle all downstream library licenses +cd python +cargo-bundle-licenses \ + --format yaml \ + --output ${SRC_DIR}/THIRDPARTY.yml + +# Apply PEP517 to install the package +maturin build --release -i $PYTHON + +# Install wheel manually +cd target/wheels +$PYTHON -m pip install *.whl diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml new file mode 100644 index 0000000000000..f3dca327743f1 --- /dev/null +++ b/recipes/pylance/meta.yaml @@ -0,0 +1,52 @@ +{% set name = "pylance" %} +{% set version = "0.9.8" %} +{% set build_number = environ.get('GIT_DESCRIBE_NUMBER', '0') %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz + sha256: b1152fd112214e2974280964ba934202e7e8b736cd768177d0ff25dc80663392 + +build: + number: 0 + skip: true # [py2k or py<37 or win or osx] + +requirements: + build: + - python # [build_platform != target_platform] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - crossenv # [build_platform != target_platform] + - maturin >=1.4.0,<2 # [build_platform != target_platform] + - libprotobuf + - {{ compiler('c') }} + - {{ compiler('rust') }} + - cargo-bundle-licenses + host: + - python # [not (build_platform == "linux-64" and target_platform == "win-64")] + - pip # [not (build_platform == "linux-64" and target_platform == "win-64")] + - maturin >=1.4.0,<2 # [not (build_platform == "linux-64" and target_platform == "win-64")] + run: + - python + - pyarrow >=12 + - pyarrow-hotfix + +test: + commands: + - pip check + requires: + - pip + +about: + home: https://github.com/lancedb/lancedb + summary: python wrapper for Lance columnar format + license: Apache-2.0 + license_file: + - LICENSE + - python/LICENSE + +extra: + recipe-maintainers: + - yhori991 diff --git a/recipes/pylance/run_test.py b/recipes/pylance/run_test.py new file mode 100644 index 0000000000000..d767520487835 --- /dev/null +++ b/recipes/pylance/run_test.py @@ -0,0 +1,7 @@ +try: + import lance # noqa +except Exception: + print("\033[0;31mFAILED:\033[0m run_tests.py") + raise +else: + print("\033[0;32mPASSED:\033[0m run_tests.py") From 8926ff94aa26a3088f25fbb11ea75fe4722c44f9 Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 12:35:58 +0000 Subject: [PATCH 02/23] Add MacOS --- recipes/pylance/bld.bat | 5 ++++- recipes/pylance/build.sh | 8 ++++++-- recipes/pylance/meta.yaml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/recipes/pylance/bld.bat b/recipes/pylance/bld.bat index 5efbceb9f7dc5..1c6191f0b3690 100644 --- a/recipes/pylance/bld.bat +++ b/recipes/pylance/bld.bat @@ -8,7 +8,10 @@ cargo-bundle-licenses ^ --output %SRC_DIR%\THIRDPARTY.yml ^ || goto :error REM Use PEP517 to install the package -maturin build --release -i %PYTHON% +maturin build ^ + --release ^ + --strip ^ + --manylinux off REM Install wheel cd target/wheels REM set UTF-8 mode by default diff --git a/recipes/pylance/build.sh b/recipes/pylance/build.sh index a701ba7235cd7..82f372929279e 100644 --- a/recipes/pylance/build.sh +++ b/recipes/pylance/build.sh @@ -7,8 +7,12 @@ cargo-bundle-licenses \ --output ${SRC_DIR}/THIRDPARTY.yml # Apply PEP517 to install the package -maturin build --release -i $PYTHON +maturin build \ + --release \ + --strip \ + --manylinux off \ + --interpreter="${PYTHON}" # Install wheel manually cd target/wheels -$PYTHON -m pip install *.whl +"${PYTHON}" -m pip install *.whl --no-deps -vv diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index f3dca327743f1..2e3d2b1f80263 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - skip: true # [py2k or py<37 or win or osx] + skip: true # [py<37 or win] requirements: build: From 709c2ff59969eb3c1bd4a23e18795d57a905aef1 Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 13:07:50 +0000 Subject: [PATCH 03/23] Pin MACOSX_DEPLOYMENT_TARGET --- recipes/pylance/conda_build_config.yaml | 7 +++++++ recipes/pylance/meta.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 recipes/pylance/conda_build_config.yaml diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml new file mode 100644 index 0000000000000..8b8b3e57f4e23 --- /dev/null +++ b/recipes/pylance/conda_build_config.yaml @@ -0,0 +1,7 @@ +channel_sources: + - conda-forge/label/rust_dev,conda-forge +# ld: warning: object file (/Users/runner/Miniforge3/conda-bld/pylance_1705840975165/_build_env/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-11c3039f74959a20.rlib(compiler_builtins-11c3039f74959a20.compiler_builtins.6d89d5519e7602e-cgu.032.rcgu.o)) was built for newer macOS version (10.12) than being linked (10.9) +macos_min_version: # [osx] + - 10.12 # [osx] +MACOSX_DEPLOYMENT_TARGET: # [osx] + - 10.12 # [osx] \ No newline at end of file diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 2e3d2b1f80263..a0df94d80d9d1 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - skip: true # [py<37 or win] + skip: true # [py<38 or win] requirements: build: From b1cc1b0fae5a71c806398af5490c29bcfa0aa00e Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 15:11:33 +0000 Subject: [PATCH 04/23] Add support for Win --- recipes/pylance/conda_build_config.yaml | 6 +++++- recipes/pylance/meta.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml index 8b8b3e57f4e23..700cc341c6ce9 100644 --- a/recipes/pylance/conda_build_config.yaml +++ b/recipes/pylance/conda_build_config.yaml @@ -1,7 +1,11 @@ channel_sources: - conda-forge/label/rust_dev,conda-forge +# Support for OSX # ld: warning: object file (/Users/runner/Miniforge3/conda-bld/pylance_1705840975165/_build_env/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-11c3039f74959a20.rlib(compiler_builtins-11c3039f74959a20.compiler_builtins.6d89d5519e7602e-cgu.032.rcgu.o)) was built for newer macOS version (10.12) than being linked (10.9) macos_min_version: # [osx] - 10.12 # [osx] MACOSX_DEPLOYMENT_TARGET: # [osx] - - 10.12 # [osx] \ No newline at end of file + - 10.12 # [osx] +# Support for Win +c_compiler: # [win] +- vs2019 # [win] \ No newline at end of file diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index a0df94d80d9d1..760e000c09c9c 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - skip: true # [py<38 or win] + skip: true # [py<38] requirements: build: From f4057f6cc2ef818b8a2b771e6113117a74c6d06c Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 16:18:46 +0000 Subject: [PATCH 05/23] Fix for Win --- recipes/pylance/conda_build_config.yaml | 2 +- recipes/pylance/meta.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml index 700cc341c6ce9..840e12afac7a4 100644 --- a/recipes/pylance/conda_build_config.yaml +++ b/recipes/pylance/conda_build_config.yaml @@ -8,4 +8,4 @@ MACOSX_DEPLOYMENT_TARGET: # [osx] - 10.12 # [osx] # Support for Win c_compiler: # [win] -- vs2019 # [win] \ No newline at end of file + - vs2019 # [win] \ No newline at end of file diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 760e000c09c9c..e48212ac72087 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -20,14 +20,15 @@ requirements: - cross-python_{{ target_platform }} # [build_platform != target_platform] - crossenv # [build_platform != target_platform] - maturin >=1.4.0,<2 # [build_platform != target_platform] - - libprotobuf - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses + - libprotobuf host: - python # [not (build_platform == "linux-64" and target_platform == "win-64")] - pip # [not (build_platform == "linux-64" and target_platform == "win-64")] - maturin >=1.4.0,<2 # [not (build_platform == "linux-64" and target_platform == "win-64")] + - libprotobuf # [not (build_platform == "linux-64" and target_platform == "win-64")] run: - python - pyarrow >=12 From d1a37c2643f9ff802f3fa43ed2059c4a05d796cf Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 16:59:47 +0000 Subject: [PATCH 06/23] Add protobuf --- recipes/pylance/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index e48212ac72087..51ed5a22378df 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -23,12 +23,13 @@ requirements: - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses + - protobuf - libprotobuf host: - python # [not (build_platform == "linux-64" and target_platform == "win-64")] - pip # [not (build_platform == "linux-64" and target_platform == "win-64")] - maturin >=1.4.0,<2 # [not (build_platform == "linux-64" and target_platform == "win-64")] - - libprotobuf # [not (build_platform == "linux-64" and target_platform == "win-64")] + - libprotobuf run: - python - pyarrow >=12 From 39f5abc4a9c36d7c7a37a22aaf73ca5e68b061c0 Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 21 Jan 2024 17:28:54 +0000 Subject: [PATCH 07/23] Give up windows for now --- recipes/pylance/meta.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 51ed5a22378df..94938d859794e 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -12,7 +12,10 @@ source: build: number: 0 - skip: true # [py<38] + # There's a protocol buffer related error. + # This recipe skips windows until it gets fixed...! + # https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=862176&view=logs&j=240f1fee-52bc-5498-a14a-8361bde76ba0&t=7c0f8eae-6d6f-51bf-636f-73a1a7fb1bc4 + skip: true # [py<38 or win] requirements: build: @@ -23,7 +26,6 @@ requirements: - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses - - protobuf - libprotobuf host: - python # [not (build_platform == "linux-64" and target_platform == "win-64")] @@ -33,6 +35,7 @@ requirements: run: - python - pyarrow >=12 + # pyarrow needs to be patched up until 14.0.1. - pyarrow-hotfix test: From 599ec3899651ac1054315fed66874826e9aec28c Mon Sep 17 00:00:00 2001 From: yhori Date: Mon, 22 Jan 2024 12:08:23 +0000 Subject: [PATCH 08/23] Import praticies from polars --- recipes/pylance/build.sh | 40 ++++++++++++++++--------- recipes/pylance/conda_build_config.yaml | 7 ++--- recipes/pylance/meta.yaml | 12 ++++---- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/recipes/pylance/build.sh b/recipes/pylance/build.sh index 82f372929279e..b8aa4317bc075 100644 --- a/recipes/pylance/build.sh +++ b/recipes/pylance/build.sh @@ -1,18 +1,30 @@ +#!/usr/bin/env bash set -ex -# Bundle all downstream library licenses -cd python -cargo-bundle-licenses \ - --format yaml \ - --output ${SRC_DIR}/THIRDPARTY.yml +if [[ ("${target_platform}" == "win-64" && "${build_platform}" == "linux-64") ]]; then + # Bundle all downstream library licenses + cd python + cargo-bundle-licenses \ + --format yaml \ + --output ${SRC_DIR}/THIRDPARTY.yml -# Apply PEP517 to install the package -maturin build \ - --release \ - --strip \ - --manylinux off \ - --interpreter="${PYTHON}" + # Apply PEP517 to install the package + maturin build \ + --release \ + --strip \ + --manylinux off \ + --interpreter="${PYTHON}" -# Install wheel manually -cd target/wheels -"${PYTHON}" -m pip install *.whl --no-deps -vv + # Install wheel manually + cd target/wheels + "${PYTHON}" -m pip install *.whl \ + -vv \ + --no-deps \ + --target $PREFIX/lib/site-packages \ + --platform win_amd64 +else + # Run the maturin build via pip which works for direct and + # cross-compiled builds. + cd python + $PYTHON -m pip install . -vv +fi \ No newline at end of file diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml index 840e12afac7a4..783d14d3d8375 100644 --- a/recipes/pylance/conda_build_config.yaml +++ b/recipes/pylance/conda_build_config.yaml @@ -1,11 +1,8 @@ channel_sources: - - conda-forge/label/rust_dev,conda-forge + - conda-forge # Support for OSX # ld: warning: object file (/Users/runner/Miniforge3/conda-bld/pylance_1705840975165/_build_env/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-11c3039f74959a20.rlib(compiler_builtins-11c3039f74959a20.compiler_builtins.6d89d5519e7602e-cgu.032.rcgu.o)) was built for newer macOS version (10.12) than being linked (10.9) macos_min_version: # [osx] - 10.12 # [osx] MACOSX_DEPLOYMENT_TARGET: # [osx] - - 10.12 # [osx] -# Support for Win -c_compiler: # [win] - - vs2019 # [win] \ No newline at end of file + - 10.12 # [osx] \ No newline at end of file diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 94938d859794e..472951ba1139b 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -12,7 +12,7 @@ source: build: number: 0 - # There's a protocol buffer related error. + # There's a protocol buffer related error... # This recipe skips windows until it gets fixed...! # https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=862176&view=logs&j=240f1fee-52bc-5498-a14a-8361bde76ba0&t=7c0f8eae-6d6f-51bf-636f-73a1a7fb1bc4 skip: true # [py<38 or win] @@ -20,22 +20,22 @@ build: requirements: build: - python # [build_platform != target_platform] - - cross-python_{{ target_platform }} # [build_platform != target_platform] + # there is no cross-python for linux-64 -> win-64 + - cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"] - crossenv # [build_platform != target_platform] - maturin >=1.4.0,<2 # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses - - libprotobuf + - protobuf host: + # this is a hacky way to do cross-compilation from linux to windows - python # [not (build_platform == "linux-64" and target_platform == "win-64")] - pip # [not (build_platform == "linux-64" and target_platform == "win-64")] - maturin >=1.4.0,<2 # [not (build_platform == "linux-64" and target_platform == "win-64")] - - libprotobuf run: - python - - pyarrow >=12 - # pyarrow needs to be patched up until 14.0.1. + - pyarrow - pyarrow-hotfix test: From 1533fcf8ab12a5b0a54e4994ab5a774b6bfa808f Mon Sep 17 00:00:00 2001 From: yhori Date: Mon, 22 Jan 2024 12:57:03 +0000 Subject: [PATCH 09/23] Clean up --- recipes/pylance/meta.yaml | 2 ++ recipes/pylance/run_test.py | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 recipes/pylance/run_test.py diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 472951ba1139b..3902522e3bc76 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -39,6 +39,8 @@ requirements: - pyarrow-hotfix test: + imports: + - lance commands: - pip check requires: diff --git a/recipes/pylance/run_test.py b/recipes/pylance/run_test.py deleted file mode 100644 index d767520487835..0000000000000 --- a/recipes/pylance/run_test.py +++ /dev/null @@ -1,7 +0,0 @@ -try: - import lance # noqa -except Exception: - print("\033[0;31mFAILED:\033[0m run_tests.py") - raise -else: - print("\033[0;32mPASSED:\033[0m run_tests.py") From 07f8a316c2e0c6e3bab45c485de92d59200388e6 Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:44:31 +0900 Subject: [PATCH 10/23] Update recipes/pylance/conda_build_config.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/conda_build_config.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml index 783d14d3d8375..e87524bf32d1b 100644 --- a/recipes/pylance/conda_build_config.yaml +++ b/recipes/pylance/conda_build_config.yaml @@ -1,7 +1,3 @@ -channel_sources: - - conda-forge -# Support for OSX -# ld: warning: object file (/Users/runner/Miniforge3/conda-bld/pylance_1705840975165/_build_env/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-11c3039f74959a20.rlib(compiler_builtins-11c3039f74959a20.compiler_builtins.6d89d5519e7602e-cgu.032.rcgu.o)) was built for newer macOS version (10.12) than being linked (10.9) macos_min_version: # [osx] - 10.12 # [osx] MACOSX_DEPLOYMENT_TARGET: # [osx] From 98243012e10d37d24688b9e55883ee343e3ef781 Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:46:34 +0900 Subject: [PATCH 11/23] Update recipes/pylance/meta.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 3902522e3bc76..8032a47fcb477 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -27,7 +27,7 @@ requirements: - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses - - protobuf + - libprotobuf host: # this is a hacky way to do cross-compilation from linux to windows - python # [not (build_platform == "linux-64" and target_platform == "win-64")] From 8f2ceb3c8891d46957b46d92ad8e4c136f0750ae Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:47:00 +0900 Subject: [PATCH 12/23] Update recipes/pylance/meta.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 8032a47fcb477..e963eb58aa808 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -1,6 +1,5 @@ {% set name = "pylance" %} {% set version = "0.9.8" %} -{% set build_number = environ.get('GIT_DESCRIBE_NUMBER', '0') %} package: name: {{ name|lower }} From a07936f7aa79d7e2e2fc62fd66636104be9ea58a Mon Sep 17 00:00:00 2001 From: yhori Date: Mon, 22 Jan 2024 16:57:12 +0000 Subject: [PATCH 13/23] Remove cross-compile settings --- recipes/pylance/build.sh | 40 ++++++++++++++------------------------- recipes/pylance/meta.yaml | 17 ++++------------- 2 files changed, 18 insertions(+), 39 deletions(-) diff --git a/recipes/pylance/build.sh b/recipes/pylance/build.sh index b8aa4317bc075..60368143df5a3 100644 --- a/recipes/pylance/build.sh +++ b/recipes/pylance/build.sh @@ -1,30 +1,18 @@ #!/usr/bin/env bash set -ex +# Bundle all downstream library licenses +cd python +cargo-bundle-licenses \ + --format yaml \ + --output ${SRC_DIR}/THIRDPARTY.yml -if [[ ("${target_platform}" == "win-64" && "${build_platform}" == "linux-64") ]]; then - # Bundle all downstream library licenses - cd python - cargo-bundle-licenses \ - --format yaml \ - --output ${SRC_DIR}/THIRDPARTY.yml +# Apply PEP517 to install the package +maturin build \ + --release \ + --strip \ + --manylinux off \ + --interpreter="${PYTHON}" - # Apply PEP517 to install the package - maturin build \ - --release \ - --strip \ - --manylinux off \ - --interpreter="${PYTHON}" - - # Install wheel manually - cd target/wheels - "${PYTHON}" -m pip install *.whl \ - -vv \ - --no-deps \ - --target $PREFIX/lib/site-packages \ - --platform win_amd64 -else - # Run the maturin build via pip which works for direct and - # cross-compiled builds. - cd python - $PYTHON -m pip install . -vv -fi \ No newline at end of file +# Install wheel manually +cd target/wheels +"${PYTHON}" -m pip install *.whl -vv --no-deps diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index e963eb58aa808..6a0e20964d8d3 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -11,27 +11,18 @@ source: build: number: 0 - # There's a protocol buffer related error... - # This recipe skips windows until it gets fixed...! - # https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=862176&view=logs&j=240f1fee-52bc-5498-a14a-8361bde76ba0&t=7c0f8eae-6d6f-51bf-636f-73a1a7fb1bc4 - skip: true # [py<38 or win] + skip: true # [py<38] requirements: build: - - python # [build_platform != target_platform] - # there is no cross-python for linux-64 -> win-64 - - cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"] - - crossenv # [build_platform != target_platform] - - maturin >=1.4.0,<2 # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('rust') }} - cargo-bundle-licenses - libprotobuf host: - # this is a hacky way to do cross-compilation from linux to windows - - python # [not (build_platform == "linux-64" and target_platform == "win-64")] - - pip # [not (build_platform == "linux-64" and target_platform == "win-64")] - - maturin >=1.4.0,<2 # [not (build_platform == "linux-64" and target_platform == "win-64")] + - python + - pip + - maturin run: - python - pyarrow From 325a1ee14f4f0efa0c8a784251b3dffb5a3588c9 Mon Sep 17 00:00:00 2001 From: yhori Date: Tue, 23 Jan 2024 16:05:05 +0000 Subject: [PATCH 14/23] Fix the project home url --- recipes/pylance/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 6a0e20964d8d3..e1fee8128f3ce 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -37,7 +37,7 @@ test: - pip about: - home: https://github.com/lancedb/lancedb + home: https://github.com/lancedb/lance summary: python wrapper for Lance columnar format license: Apache-2.0 license_file: From 6e8073b8d31187007d3cc8ad798747cfcedfce90 Mon Sep 17 00:00:00 2001 From: yhori Date: Tue, 23 Jan 2024 16:11:24 +0000 Subject: [PATCH 15/23] Align maturin build parameters --- recipes/pylance/bld.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/pylance/bld.bat b/recipes/pylance/bld.bat index 1c6191f0b3690..fc417bf1ecac2 100644 --- a/recipes/pylance/bld.bat +++ b/recipes/pylance/bld.bat @@ -11,7 +11,8 @@ REM Use PEP517 to install the package maturin build ^ --release ^ --strip ^ - --manylinux off + --manylinux off ^ + --interpreter=%PYTHON% REM Install wheel cd target/wheels REM set UTF-8 mode by default From fc63f0d0697d4054751ffda5e149d48298bf31b5 Mon Sep 17 00:00:00 2001 From: yhori Date: Mon, 29 Jan 2024 14:43:24 +0000 Subject: [PATCH 16/23] Bump the version up --- recipes/pylance/meta.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index e1fee8128f3ce..496a949fd45eb 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pylance" %} -{% set version = "0.9.8" %} +{% set version = "0.9.10" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz - sha256: b1152fd112214e2974280964ba934202e7e8b736cd768177d0ff25dc80663392 + sha256: 69330986e7119166ea7a2d49d4689f153b044d07b70de332872109cf720e6106 build: number: 0 @@ -25,7 +25,8 @@ requirements: - maturin run: - python - - pyarrow + - numpy >=1.22 + - pyarrow >=12 - pyarrow-hotfix test: From 637d0ed7e8a47d96e14fcd0acc74a57e98bc33be Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:16:08 +0900 Subject: [PATCH 17/23] Update recipes/pylance/conda_build_config.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/conda_build_config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/pylance/conda_build_config.yaml b/recipes/pylance/conda_build_config.yaml index e87524bf32d1b..a51450323e65e 100644 --- a/recipes/pylance/conda_build_config.yaml +++ b/recipes/pylance/conda_build_config.yaml @@ -1,4 +1,2 @@ -macos_min_version: # [osx] - - 10.12 # [osx] MACOSX_DEPLOYMENT_TARGET: # [osx] - 10.12 # [osx] \ No newline at end of file From 160552b6ab1abff6e2eb407d0cbc8fa8a13d4981 Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:20:55 +0900 Subject: [PATCH 18/23] Update recipes/pylance/meta.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 496a949fd45eb..9b03d154653fd 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -44,6 +44,7 @@ about: license_file: - LICENSE - python/LICENSE + - THIRDPARTY.yml extra: recipe-maintainers: From 7e330ab2bb926287f6ce5de935120850cc4dfe8f Mon Sep 17 00:00:00 2001 From: yhori Date: Fri, 2 Feb 2024 06:47:11 +0000 Subject: [PATCH 19/23] Bump up version number to v0.9.12 --- recipes/pylance/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 9b03d154653fd..9c89dd51b92c1 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pylance" %} -{% set version = "0.9.10" %} +{% set version = "0.9.12" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz - sha256: 69330986e7119166ea7a2d49d4689f153b044d07b70de332872109cf720e6106 + sha256: 87302a5e6fe3326a2f1ec360fab8af77665f6d640b97d063266055d7a7e98382 build: number: 0 From ba0cbd0541dd3ca1bc09ba0532097cb36b535e0b Mon Sep 17 00:00:00 2001 From: yhori Date: Sat, 3 Feb 2024 08:56:19 +0000 Subject: [PATCH 20/23] Change the version number to v0.9.11 --- recipes/pylance/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 9c89dd51b92c1..fa7ae01bca6a2 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pylance" %} -{% set version = "0.9.12" %} +{% set version = "0.9.11" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz - sha256: 87302a5e6fe3326a2f1ec360fab8af77665f6d640b97d063266055d7a7e98382 + sha256: c004f6f3d5f871bad186f9b0ac893c3d52be8f6e0fd2b771e41fdc44ddfeb7fc build: number: 0 From 6a554fa42762909bcdba109a8207cf263a619af8 Mon Sep 17 00:00:00 2001 From: yhori Date: Sat, 3 Feb 2024 09:31:56 +0000 Subject: [PATCH 21/23] Add xz as a runtime dependancy --- recipes/pylance/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index fa7ae01bca6a2..5351a15cfced2 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pylance" %} -{% set version = "0.9.11" %} +{% set version = "0.9.12" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz - sha256: c004f6f3d5f871bad186f9b0ac893c3d52be8f6e0fd2b771e41fdc44ddfeb7fc + sha256: 87302a5e6fe3326a2f1ec360fab8af77665f6d640b97d063266055d7a7e98382 build: number: 0 @@ -28,6 +28,7 @@ requirements: - numpy >=1.22 - pyarrow >=12 - pyarrow-hotfix + - xz # [linux-64] test: imports: From d7447060058777125c8ed761bccc4ca544febc43 Mon Sep 17 00:00:00 2001 From: yhori <43234011+yhori991@users.noreply.github.com> Date: Sun, 4 Feb 2024 22:44:19 +0900 Subject: [PATCH 22/23] Update recipes/pylance/meta.yaml Co-authored-by: Uwe L. Korn --- recipes/pylance/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index 5351a15cfced2..dca93869cc54a 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -27,7 +27,6 @@ requirements: - python - numpy >=1.22 - pyarrow >=12 - - pyarrow-hotfix - xz # [linux-64] test: From ca71a19475fcb3db3222b26c1ce413a8ebeee013 Mon Sep 17 00:00:00 2001 From: yhori Date: Sun, 4 Feb 2024 13:54:19 +0000 Subject: [PATCH 23/23] Move xz to the host section --- recipes/pylance/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/pylance/meta.yaml b/recipes/pylance/meta.yaml index dca93869cc54a..e135e588f15db 100644 --- a/recipes/pylance/meta.yaml +++ b/recipes/pylance/meta.yaml @@ -23,11 +23,11 @@ requirements: - python - pip - maturin + - xz # [linux-64] run: - python - numpy >=1.22 - pyarrow >=12 - - xz # [linux-64] test: imports: