Skip to content

Commit

Permalink
Merge pull request #25093 from yhori991/add-pylance
Browse files Browse the repository at this point in the history
Add pylance
  • Loading branch information
xhochy committed Feb 7, 2024
2 parents dc6f12b + da746fb commit 8ade71c
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
23 changes: 23 additions & 0 deletions recipes/pylance/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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 ^
--strip ^
--manylinux off ^
--interpreter=%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
18 changes: 18 additions & 0 deletions recipes/pylance/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +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

# 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
2 changes: 2 additions & 0 deletions recipes/pylance/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 10.12 # [osx]
51 changes: 51 additions & 0 deletions recipes/pylance/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% set name = "pylance" %}
{% set version = "0.9.12" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/lancedb/lance/archive/refs/tags/v{{ version }}.tar.gz
sha256: 87302a5e6fe3326a2f1ec360fab8af77665f6d640b97d063266055d7a7e98382

build:
number: 0
skip: true # [py<38]

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('rust') }}
- cargo-bundle-licenses
- libprotobuf
host:
- python
- pip
- maturin
- xz # [linux-64]
run:
- python
- numpy >=1.22
- pyarrow >=12

test:
imports:
- lance
commands:
- pip check
requires:
- pip

about:
home: https://github.com/lancedb/lance
summary: python wrapper for Lance columnar format
license: Apache-2.0
license_file:
- LICENSE
- python/LICENSE
- THIRDPARTY.yml

extra:
recipe-maintainers:
- yhori991

0 comments on commit 8ade71c

Please sign in to comment.