diff --git a/.ci_support/build_all.py b/.ci_support/build_all.py index ea5ee8cb55e7d..57677db32c979 100644 --- a/.ci_support/build_all.py +++ b/.ci_support/build_all.py @@ -60,6 +60,7 @@ def build_all(recipes_dir, arch): deployment_version = (0, 0) sdk_version = (0, 0) + channel_urls = ['local'] for folder in folders: cbc = os.path.join(recipes_dir, folder, "conda_build_config.yaml") if os.path.exists(cbc): @@ -79,6 +80,10 @@ def build_all(recipes_dir, arch): version = tuple([int(x) for x in version.split('.')]) sdk_version = max(sdk_version, deployment_version, version) + if 'channel_sources' in text: + config = load(text, Loader=BaseLoader) + channel_urls += config['channel_sources'][0].split(',') + with open(variant_config_file, 'r') as f: variant_text = ''.join(f.readlines()) @@ -100,8 +105,9 @@ def build_all(recipes_dir, arch): if platform == "osx" and (sdk_version != (0, 0) or deployment_version != (0, 0)): subprocess.run("run_conda_forge_build_setup", shell=True, check=True) - print("Building {} with conda-forge/label/main".format(','.join(folders))) - channel_urls = ['local', 'conda-forge'] + if 'conda-forge' not in channel_urls: + channel_urls.append('conda-forge') + print("Building {} with {}".format(','.join(folders), ','.join(channel_urls))) build_folders(recipes_dir, folders, arch, channel_urls) @@ -202,4 +208,4 @@ def use_mambabuild(): if use_mamba: use_mambabuild() subprocess.run("conda clean --all --yes", shell=True, check=True) - build_all(os.path.join(root_dir, "recipes"), args.arch) + build_all(os.path.join(root_dir, "recipes"), args.arch) \ No newline at end of file diff --git a/.ci_support/linux64.yaml b/.ci_support/linux64.yaml index 37ba1c601489e..b8fb83890f52d 100644 --- a/.ci_support/linux64.yaml +++ b/.ci_support/linux64.yaml @@ -7,7 +7,7 @@ fortran_compiler: target_platform: - linux-64 channel_sources: -- conda-forge +- conda-forge/label/rust_dev,conda-forge docker_image: - quay.io/condaforge/linux-anvil-comp7 cuda_compiler_version: diff --git a/.ci_support/osx64.yaml b/.ci_support/osx64.yaml index 0b7e1f30ef0da..be70fab334742 100644 --- a/.ci_support/osx64.yaml +++ b/.ci_support/osx64.yaml @@ -5,6 +5,6 @@ cxx_compiler: fortran_compiler: - gfortran channel_sources: - - conda-forge + - conda-forge/label/rust_dev,conda-forge target_platform: - osx-64 diff --git a/.ci_support/win64.yaml b/.ci_support/win64.yaml index dfb5b8c1a89bf..d5dbd620b9f2f 100644 --- a/.ci_support/win64.yaml +++ b/.ci_support/win64.yaml @@ -1,4 +1,4 @@ channel_sources: - - conda-forge + - conda-forge/label/rust_dev,conda-forge target_platform: - win-64 diff --git a/recipes/connectorx/build.sh b/recipes/connectorx/build.sh new file mode 100644 index 0000000000000..18961cc4fd919 --- /dev/null +++ b/recipes/connectorx/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -ex + +cp $SRC_DIR/README.md $SRC_DIR/connectorx-python/README.md +cp $SRC_DIR/LICENSE $SRC_DIR/connectorx-python/LICENSE + +pushd $SRC_DIR/connectorx-python +poetry install +popd + +maturin build --no-sdist --release --strip --manylinux off --interpreter="${PYTHON}" -m connectorx-python/Cargo.toml + +"${PYTHON}" -m pip install $SRC_DIR/connectorx-python/target/wheels/*.whl --no-deps -vv + +cargo-bundle-licenses --format yaml --output THIRDPARTY.yml diff --git a/recipes/connectorx/conda_build_config.yaml b/recipes/connectorx/conda_build_config.yaml new file mode 100644 index 0000000000000..fbfc625028e86 --- /dev/null +++ b/recipes/connectorx/conda_build_config.yaml @@ -0,0 +1,2 @@ +channel_sources: + - conda-forge/label/rust_dev,conda-forge \ No newline at end of file diff --git a/recipes/connectorx/meta.yaml b/recipes/connectorx/meta.yaml new file mode 100644 index 0000000000000..7f7c7054c6e5e --- /dev/null +++ b/recipes/connectorx/meta.yaml @@ -0,0 +1,58 @@ +{% set name = "connectorx" %} +{% set version = "0.3.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + - url: https://github.com/sfu-db/connector-x/archive/refs/tags/v{{ version }}.tar.gz + sha256: c8d13ac38d9da5793f8ccb0c3777761bcfaa89f0f18cbf0597d0bd4f347612c9 + +build: + number: 0 + skip: true # [py<37 or win] + +requirements: + build: + - python # [build_platform != target_platform] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - crossenv # [build_platform != target_platform] + - {{ compiler('c') }} + - {{ compiler('rust') }} + - posix # [win] + - cmake + - make # [unix] + - cargo-bundle-licenses + host: + - python + - pip + - poetry + - maturin >=0.12.11,<0.13 + run: + - python + - numpy >=1.21.5 + - libzlib + +test: + imports: + - connectorx + commands: + - pip check + requires: + - pip + +about: + home: https://github.com/sfu-db/connector-x + license: MIT + license_family: MIT + license_file: + - LICENSE + - THIRDPARTY.yml + summary: "Fastest library to load data from DB to DataFrames in Rust and Python" + dev_url: https://github.com/sfu-db/connector-x + +extra: + recipe-maintainers: + - timkpaine + - wangxiaoying