diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml new file mode 100644 index 000000000..9853230de --- /dev/null +++ b/.github/workflows/conda.yml @@ -0,0 +1,61 @@ +name: Build conda nightly +on: [push, pull_request] + +# Cancel any already running instances of this build +concurrency: + group: conda-${{ github.head_ref }} + cancel-in-progress: true + +# Required shell entrypoint to have properly activated conda environments +defaults: + run: + shell: bash -l {0} + +jobs: + conda: + name: Build (and optionally upload) the conda nightly + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Python + uses: conda-incubator/setup-miniconda@v2.2.0 + with: + miniforge-variant: Mambaforge + use-mamba: true + python-version: "3.10" + channel-priority: strict + - name: Install dependencies + run: | + mamba install boa conda-verify + + which python + pip list + mamba list + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: clippy, rustfmt + - name: Build conda package + run: | + # suffix for nightly package versions + export VERSION_SUFFIX=a`date +%y%m%d` + + conda mambabuild conda/recipes \ + --no-anaconda-upload \ + --output-folder . + # - name: Upload conda package + # if: | + # github.event_name == 'push' + # && github.repository == 'apache/arrow-datafusion-python' + # env: + # ANACONDA_API_TOKEN: ${{ secrets.DASK_CONDA_TOKEN }} + # LABEL: ${{ github.ref == 'refs/heads/datafusion-sql-planner' && 'dev_datafusion' || 'dev' }} + # run: | + # # install anaconda for upload + # mamba install anaconda-client + + # anaconda upload --label $LABEL linux-64/*.tar.bz2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 164b09e15..c69205be3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,6 @@ jobs: - "3.10" toolchain: - "stable" - - "beta" # we are not that much eager in walking on the edge yet # - nightly # build stable for only 3.7 diff --git a/Cargo.lock b/Cargo.lock index 69505061f..f4d8e0f7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2072,9 +2072,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.141" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "libflate" @@ -2123,9 +2123,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2" +checksum = "9b085a4f2cde5781fc4b1717f2e86c62f5cda49de7ba99a7c2eae02b61c9064c" [[package]] name = "lock_api" @@ -2910,9 +2910,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.12" +version = "0.37.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722529a737f5a942fdbac3a46cee213053196737c5eaa3386d52e85b786f2659" +checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" dependencies = [ "bitflags 1.3.2", "errno", diff --git a/conda/recipes/build.sh b/conda/recipes/build.sh deleted file mode 100644 index f10be3581..000000000 --- a/conda/recipes/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -maturin build -r diff --git a/conda/recipes/meta.yaml b/conda/recipes/meta.yaml index cce614b2f..48e95eb08 100644 --- a/conda/recipes/meta.yaml +++ b/conda/recipes/meta.yaml @@ -15,11 +15,14 @@ # specific language governing permissions and limitations # under the License. -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} -{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} +{% set name = "datafusion" %} +{% set major_minor_patch = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').split('.') %} +{% set new_patch = major_minor_patch[2] | int + 1 %} +{% set version = (major_minor_patch[:2] + [new_patch]) | join('.') + environ.get('VERSION_SUFFIX', '') %} + package: - name: datafusion + name: {{ name|lower }} version: {{ version }} source: @@ -27,20 +30,26 @@ source: build: noarch: python + script: {{ PYTHON }} -m pip install . -vv number: 0 requirements: host: - - {{ compiler('rust') }} - - python - - setuptools - - maturin + - python >=3.6 + - maturin >=0.14,<0.15 + - libprotobuf =3 + - pip run: - - python + - python >=3.6 + - pyarrow >=11.0.0 test: imports: - datafusion + commands: + - pip check + requires: + - pip about: home: https://arrow.apache.org/datafusion diff --git a/pyproject.toml b/pyproject.toml index 87d0be6cf..cf68a33c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ classifier = [ "Programming Language :: Rust", ] dependencies = [ - "pyarrow>=6.0.1", + "pyarrow>=11.0.0", ] [project.urls]