This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new b631d29 fix(ci): make sure Conda packages are properly noarch (#399)
b631d29 is described below
commit b631d2957c871b2fd76b8fa7460e726b004a5148
Author: David Li <[email protected]>
AuthorDate: Thu Jan 26 11:35:02 2023 -0500
fix(ci): make sure Conda packages are properly noarch (#399)
- Don't bundle the shared library
- Don't rebuild it per Python version
Fixes #388.
---
ci/conda/build-python.bat | 3 ---
ci/conda/build-python.sh | 22 +---------------------
ci/conda/meta.yaml | 18 ++++++------------
3 files changed, 7 insertions(+), 36 deletions(-)
diff --git a/ci/conda/build-python.bat b/ci/conda/build-python.bat
index 3c3fb2b..bf24dc7 100644
--- a/ci/conda/build-python.bat
+++ b/ci/conda/build-python.bat
@@ -21,17 +21,14 @@ if "%PKG_NAME%" == "adbc-driver-manager" (
)
if "%PKG_NAME%" == "adbc-driver-flightsql" (
pushd "%SRC_DIR%"\python\adbc_driver_flightsql
- set ADBC_FLIGHTSQL_LIBRARY=%LIBRARY_BIN%\adbc_driver_flightsql.dll
goto BUILD
)
if "%PKG_NAME%" == "adbc-driver-postgresql" (
pushd "%SRC_DIR%"\python\adbc_driver_postgresql
- set ADBC_POSTGRESQL_LIBRARY=%LIBRARY_BIN%\adbc_driver_postgresql.dll
goto BUILD
)
if "%PKG_NAME%" == "adbc-driver-sqlite" (
pushd "%SRC_DIR%"\python\adbc_driver_sqlite
- set ADBC_SQLITE_LIBRARY=%LIBRARY_BIN%\adbc_driver_sqlite.dll
goto BUILD
)
echo Unknown package %PKG_NAME%
diff --git a/ci/conda/build-python.sh b/ci/conda/build-python.sh
index 9684041..c9ea70b 100644
--- a/ci/conda/build-python.sh
+++ b/ci/conda/build-python.sh
@@ -18,27 +18,7 @@
set -ex
-if [[ "$(uname)" = "Darwin" ]]; then
- LIB_SUFFIX="dylib"
-else
- LIB_SUFFIX="so"
-fi
-
-if [[ "${PKG_NAME}" = "adbc-driver-manager" ]]; then
- pushd python/adbc_driver_manager
-elif [[ "${PKG_NAME}" = "adbc-driver-flightsql" ]]; then
- pushd python/adbc_driver_flightsql
- export
ADBC_FLIGHTSQL_LIBRARY=$PREFIX/lib/libadbc_driver_flightsql.$LIB_SUFFIX
-elif [[ "${PKG_NAME}" = "adbc-driver-postgresql" ]]; then
- pushd python/adbc_driver_postgresql
- export
ADBC_POSTGRESQL_LIBRARY=$PREFIX/lib/libadbc_driver_postgresql.$LIB_SUFFIX
-elif [[ "${PKG_NAME}" = "adbc-driver-sqlite" ]]; then
- pushd python/adbc_driver_sqlite
- export ADBC_SQLITE_LIBRARY=$PREFIX/lib/libadbc_driver_sqlite.$LIB_SUFFIX
-else
- echo "Unknown package ${PKG_NAME}"
- exit 1
-fi
+pushd "python/${PKG_NAME//-/_}"
export _ADBC_IS_CONDA=1
export SETUPTOOLS_SCM_PRETEND_VERSION=$PKG_VERSION
diff --git a/ci/conda/meta.yaml b/ci/conda/meta.yaml
index 92e2879..24c0721 100644
--- a/ci/conda/meta.yaml
+++ b/ci/conda/meta.yaml
@@ -169,19 +169,17 @@ outputs:
script: build-python.bat
# [win]
requirements:
build:
- - cross-python_{{ target_platform }}
# [build_platform != target_platform]
- pip
- setuptools
- - python
host:
- {{ pin_subpackage('adbc-driver-flightsql-go', exact=True) }}
- pip
- - python
+ - python >=3.9
- setuptools
run:
- {{ pin_subpackage('adbc-driver-manager') }}
- {{ pin_subpackage('adbc-driver-flightsql-go', exact=True) }}
- - python
+ - python >=3.9
run_constrained:
- pyarrow >=8.0.0
test:
@@ -195,19 +193,17 @@ outputs:
script: build-python.bat
# [win]
requirements:
build:
- - cross-python_{{ target_platform }}
# [build_platform != target_platform]
- pip
- setuptools
- - python
host:
- {{ pin_subpackage('adbc-driver-postgresql-cpp', exact=True) }}
- pip
- - python
+ - python >=3.9
- setuptools
run:
- {{ pin_subpackage('adbc-driver-manager') }}
- {{ pin_subpackage('adbc-driver-postgresql-cpp', exact=True) }}
- - python
+ - python >=3.9
run_constrained:
- pyarrow >=8.0.0
test:
@@ -221,19 +217,17 @@ outputs:
script: build-python.bat
# [win]
requirements:
build:
- - cross-python_{{ target_platform }}
# [build_platform != target_platform]
- pip
- setuptools
- - python
host:
- {{ pin_subpackage('adbc-driver-sqlite-cpp', exact=True) }}
- pip
- - python
+ - python >=3.9
- setuptools
run:
- {{ pin_subpackage('adbc-driver-manager') }}
- {{ pin_subpackage('adbc-driver-sqlite-cpp', exact=True) }}
- - python
+ - python >=3.9
run_constrained:
- pyarrow >=8.0.0
test: