Skip to content

Commit 2857364

Browse files
committed
Revert "Remove old conda files since we will use uv as our primary method for developers to set up environments"
This reverts commit 88aff7e.
1 parent 21ac4a8 commit 2857364

File tree

5 files changed

+270
-0
lines changed

5 files changed

+270
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
channels:
19+
- conda-forge
20+
dependencies:
21+
- black
22+
- flake8
23+
- isort
24+
- maturin>=1.5.1
25+
- mypy
26+
- numpy
27+
- pyarrow>=11.0.0
28+
- pytest
29+
- toml
30+
- importlib_metadata
31+
- python>=3.10
32+
# Packages useful for building distributions and releasing
33+
- mamba
34+
- conda-build
35+
- anaconda-client
36+
# Packages for documentation building
37+
- sphinx
38+
- pydata-sphinx-theme==0.8.0
39+
- myst-parser
40+
- jinja2
41+
# GPU packages
42+
- cudf
43+
- cudatoolkit=11.8
44+
name: datafusion-dev
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
channels:
19+
- conda-forge
20+
dependencies:
21+
- black
22+
- flake8
23+
- isort
24+
- maturin>=1.5.1
25+
- mypy
26+
- numpy
27+
- pyarrow>=11.0.0
28+
- pytest
29+
- toml
30+
- importlib_metadata
31+
- python>=3.10
32+
# Packages useful for building distributions and releasing
33+
- mamba
34+
- conda-build
35+
- anaconda-client
36+
# Packages for documentation building
37+
- sphinx
38+
- pydata-sphinx-theme==0.8.0
39+
- myst-parser
40+
- jinja2
41+
name: datafusion-dev

conda/recipes/bld.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
maturin build -vv -j %CPU_COUNT% --release --strip --features substrait --manylinux off --interpreter=%PYTHON%
21+
22+
FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set datafusion_wheel=%%i
23+
24+
%PYTHON% -m pip install --no-deps %datafusion_wheel% -vv
25+
26+
cargo-bundle-licenses --format yaml --output THIRDPARTY.yml

conda/recipes/build.sh

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
set -ex
22+
23+
# See https://github.com/conda-forge/rust-feedstock/blob/master/recipe/build.sh for cc env explanation
24+
if [ "$c_compiler" = gcc ] ; then
25+
case "$target_platform" in
26+
linux-64) rust_env_arch=X86_64_UNKNOWN_LINUX_GNU ;;
27+
linux-aarch64) rust_env_arch=AARCH64_UNKNOWN_LINUX_GNU ;;
28+
linux-ppc64le) rust_env_arch=POWERPC64LE_UNKNOWN_LINUX_GNU ;;
29+
*) echo "unknown target_platform $target_platform" ; exit 1 ;;
30+
esac
31+
32+
export CARGO_TARGET_${rust_env_arch}_LINKER=$CC
33+
fi
34+
35+
declare -a _xtra_maturin_args
36+
37+
mkdir -p $SRC_DIR/.cargo
38+
39+
if [ "$target_platform" = "osx-64" ] ; then
40+
cat <<EOF >> $SRC_DIR/.cargo/config
41+
[target.x86_64-apple-darwin]
42+
linker = "$CC"
43+
rustflags = [
44+
"-C", "link-arg=-undefined",
45+
"-C", "link-arg=dynamic_lookup",
46+
]
47+
48+
EOF
49+
50+
_xtra_maturin_args+=(--target=x86_64-apple-darwin)
51+
52+
elif [ "$target_platform" = "osx-arm64" ] ; then
53+
cat <<EOF >> $SRC_DIR/.cargo/config
54+
# Required for intermediate codegen stuff
55+
[target.x86_64-apple-darwin]
56+
linker = "$CC_FOR_BUILD"
57+
58+
# Required for final binary artifacts for target
59+
[target.aarch64-apple-darwin]
60+
linker = "$CC"
61+
rustflags = [
62+
"-C", "link-arg=-undefined",
63+
"-C", "link-arg=dynamic_lookup",
64+
]
65+
66+
EOF
67+
_xtra_maturin_args+=(--target=aarch64-apple-darwin)
68+
69+
# This variable must be set to the directory containing the target's libpython DSO
70+
export PYO3_CROSS_LIB_DIR=$PREFIX/lib
71+
72+
# xref: https://github.com/PyO3/pyo3/commit/7beb2720
73+
export PYO3_PYTHON_VERSION=${PY_VER}
74+
75+
# xref: https://github.com/conda-forge/python-feedstock/issues/621
76+
sed -i.bak 's,aarch64,arm64,g' $BUILD_PREFIX/venv/lib/os-patch.py
77+
sed -i.bak 's,aarch64,arm64,g' $BUILD_PREFIX/venv/lib/platform-patch.py
78+
fi
79+
80+
maturin build -vv -j "${CPU_COUNT}" --release --strip --features substrait --manylinux off --interpreter="${PYTHON}" "${_xtra_maturin_args[@]}"
81+
82+
"${PYTHON}" -m pip install $SRC_DIR/target/wheels/datafusion*.whl --no-deps -vv
83+
84+
cargo-bundle-licenses --format yaml --output THIRDPARTY.yml

conda/recipes/meta.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
{% set name = "datafusion" %}
19+
{% set major_minor_patch = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').split('.') %}
20+
{% set new_patch = major_minor_patch[2] | int + 1 %}
21+
{% set version = (major_minor_patch[:2] + [new_patch]) | join('.') + environ.get('VERSION_SUFFIX', '') %}
22+
23+
24+
package:
25+
name: {{ name|lower }}
26+
version: {{ version }}
27+
28+
source:
29+
git_url: ../..
30+
31+
build:
32+
number: {{ GIT_DESCRIBE_NUMBER }}
33+
string: py{{ python | replace(".", "") }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
34+
35+
requirements:
36+
build:
37+
- python # [build_platform != target_platform]
38+
- cross-python_{{ target_platform }} # [build_platform != target_platform]
39+
- zlib # [build_platform != target_platform]
40+
- {{ compiler('c') }}
41+
- {{ compiler('rust') }}
42+
- cargo-bundle-licenses
43+
- maturin >=1.5.1,<1.6.0
44+
- libprotobuf =3
45+
host:
46+
- python
47+
- maturin >=1.5.1,<1.6.0
48+
- pip
49+
- zlib
50+
- xz # [linux64]
51+
run:
52+
- python
53+
- pyarrow >=11.0.0
54+
- typing_extensions
55+
56+
test:
57+
imports:
58+
- datafusion
59+
commands:
60+
- pip check
61+
requires:
62+
- pip
63+
64+
about:
65+
home: https://arrow.apache.org/datafusion
66+
license: Apache-2.0
67+
license_family: APACHE
68+
license_file:
69+
- LICENSE.txt
70+
- THIRDPARTY.yml
71+
description: |
72+
DataFusion is an extensible query execution framework, written in Rust,
73+
that uses Apache Arrow as its in-memory format.
74+
doc_url: https://arrow.apache.org/datafusion
75+
dev_url: https://github.com/apache/arrow-datafusion

0 commit comments

Comments
 (0)