You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/01/04 13:31:48 UTC
[arrow-adbc] branch main updated: fix(python): add driver -> driver manager dependency (#312)
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 c504149 fix(python): add driver -> driver manager dependency (#312)
c504149 is described below
commit c504149d7474710a792485d70ecf5b552830f080
Author: David Li <li...@gmail.com>
AuthorDate: Wed Jan 4 08:31:42 2023 -0500
fix(python): add driver -> driver manager dependency (#312)
Fixes #307.
---
ci/scripts/python_sdist_test.sh | 2 +-
ci/scripts/python_wheel_unix_build.sh | 2 +-
ci/scripts/python_wheel_unix_test.sh | 4 ++--
ci/scripts/python_wheel_windows_build.bat | 2 +-
ci/scripts/python_wheel_windows_test.bat | 2 +-
python/adbc_driver_postgresql/README.md | 12 +++++++++++-
python/adbc_driver_postgresql/pyproject.toml | 3 +++
python/adbc_driver_sqlite/README.md | 12 +++++++++++-
python/adbc_driver_sqlite/pyproject.toml | 3 +++
9 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/ci/scripts/python_sdist_test.sh b/ci/scripts/python_sdist_test.sh
index 3bb9029..2171ee6 100755
--- a/ci/scripts/python_sdist_test.sh
+++ b/ci/scripts/python_sdist_test.sh
@@ -41,7 +41,7 @@ build_drivers "${source_dir}" "${build_dir}"
echo "=== Installing sdists ==="
for component in ${COMPONENTS}; do
- pip install --force-reinstall ${source_dir}/python/${component}/dist/*.tar.gz
+ pip install --no-deps --force-reinstall ${source_dir}/python/${component}/dist/*.tar.gz
done
pip install pytest pyarrow pandas
diff --git a/ci/scripts/python_wheel_unix_build.sh b/ci/scripts/python_wheel_unix_build.sh
index 0636574..a312dfa 100755
--- a/ci/scripts/python_wheel_unix_build.sh
+++ b/ci/scripts/python_wheel_unix_build.sh
@@ -107,7 +107,7 @@ for component in $COMPONENTS; do
if [[ "$component" = "adbc_driver_manager" ]]; then
python -m cibuildwheel --output-dir repaired_wheels/ dist/$component_dashes-*.tar.gz
else
- python -m pip wheel -w dist -vvv .
+ python -m pip wheel --no-deps -w dist -vvv .
# Retag the wheel
python "${script_dir}/python_wheel_fix_tag.py" --plat-name="${PLAT_NAME}" dist/$component-*.whl
diff --git a/ci/scripts/python_wheel_unix_test.sh b/ci/scripts/python_wheel_unix_test.sh
index 415c7e3..73e0e74 100755
--- a/ci/scripts/python_wheel_unix_test.sh
+++ b/ci/scripts/python_wheel_unix_test.sh
@@ -40,10 +40,10 @@ for component in ${COMPONENTS}; do
fi
if [[ -d ${source_dir}/python/${component}/repaired_wheels/ ]]; then
- pip install --force-reinstall \
+ pip install --no-deps --force-reinstall \
${source_dir}/python/${component}/repaired_wheels/*-${PYTHON_TAG}-*.whl
elif [[ -d ${source_dir}/python/${component}/dist/ ]]; then
- pip install --force-reinstall \
+ pip install --no-deps --force-reinstall \
${source_dir}/python/${component}/dist/*-${PYTHON_TAG}-*.whl
else
echo "NOTE: assuming wheels are already installed"
diff --git a/ci/scripts/python_wheel_windows_build.bat b/ci/scripts/python_wheel_windows_build.bat
index 9da11a4..598b369 100644
--- a/ci/scripts/python_wheel_windows_build.bat
+++ b/ci/scripts/python_wheel_windows_build.bat
@@ -83,7 +83,7 @@ FOR %%c IN (adbc_driver_manager adbc_driver_postgresql adbc_driver_sqlite) DO (
python %%c\_version.py
echo "=== (%PYTHON_VERSION%) Building %%c wheel ==="
- python -m pip wheel -w dist -vvv . || exit /B 1
+ python -m pip wheel --no-deps -w dist -vvv . || exit /B 1
echo "=== (%PYTHON_VERSION%) Re-tag %%c wheel ==="
FOR %%w IN (dist\*.whl) DO (
diff --git a/ci/scripts/python_wheel_windows_test.bat b/ci/scripts/python_wheel_windows_test.bat
index f27f96c..91897f9 100644
--- a/ci/scripts/python_wheel_windows_test.bat
+++ b/ci/scripts/python_wheel_windows_test.bat
@@ -23,7 +23,7 @@ echo "=== (%PYTHON_VERSION%) Installing wheels ==="
FOR %%c IN (adbc_driver_manager adbc_driver_postgresql adbc_driver_sqlite) DO (
FOR %%w IN (%source_dir%\python\%%c\dist\*.whl) DO (
- pip install --force-reinstall %%w || exit /B 1
+ pip install --no-deps --force-reinstall %%w || exit /B 1
)
)
diff --git a/python/adbc_driver_postgresql/README.md b/python/adbc_driver_postgresql/README.md
index fd70aca..c48374c 100644
--- a/python/adbc_driver_postgresql/README.md
+++ b/python/adbc_driver_postgresql/README.md
@@ -28,11 +28,21 @@ manager](../adbc_driver_manager/README.md) to provide a [DBAPI 2.0/PEP
## Building
-Dependencies: a build of the PostgreSQL driver.
+Dependencies: a build of the PostgreSQL driver, and the
+`adbc-driver-manager` Python package. Optionally, install PyArrow to
+use the DBAPI 2.0-compatible interface.
Set the environment variable `ADBC_POSTGRESQL_LIBRARY` to the path to
`libadbc_driver_postgresql.{dll,dylib,so}` before running `pip install`.
+```
+# If not already installed
+pip install -e ../adbc_driver_manager
+
+export ADBC_POSTGRESQL_LIBRARY=/path/to/libadbc_driver_postgresql.so
+pip install -e --no-deps .
+```
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for details on the
general build process.
diff --git a/python/adbc_driver_postgresql/pyproject.toml b/python/adbc_driver_postgresql/pyproject.toml
index ebc453d..48deea2 100644
--- a/python/adbc_driver_postgresql/pyproject.toml
+++ b/python/adbc_driver_postgresql/pyproject.toml
@@ -22,6 +22,9 @@ authors = [{name = "Apache Arrow Developers", email = "dev@arrow.apache.org"}]
license = {text = "Apache-2.0"}
requires-python = ">=3.9"
dynamic = ["version"]
+dependencies = [
+ "adbc-driver-manager",
+]
[project.optional-dependencies]
dbapi = ["pandas", "pyarrow>=8.0.0"]
diff --git a/python/adbc_driver_sqlite/README.md b/python/adbc_driver_sqlite/README.md
index 88b0528..c4afa0d 100644
--- a/python/adbc_driver_sqlite/README.md
+++ b/python/adbc_driver_sqlite/README.md
@@ -28,11 +28,21 @@ manager](../adbc_driver_manager/README.md) to provide a [DBAPI 2.0/PEP
## Building
-Dependencies: a build of the SQLite driver.
+Dependencies: a build of the SQLite driver, and the
+`adbc-driver-manager` Python package. Optionally, install PyArrow to
+use the DBAPI 2.0-compatible interface.
Set the environment variable `ADBC_SQLITE_LIBRARY` to the path to
`libadbc_driver_sqlite.{dll,dylib,so}` before running `pip install`.
+```
+# If not already installed
+pip install -e ../adbc_driver_manager
+
+export ADBC_SQLITE_LIBRARY=/path/to/libadbc_driver_sqlite.so
+pip install -e --no-deps .
+```
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for details on the
general build process.
diff --git a/python/adbc_driver_sqlite/pyproject.toml b/python/adbc_driver_sqlite/pyproject.toml
index b0e5921..2808e76 100644
--- a/python/adbc_driver_sqlite/pyproject.toml
+++ b/python/adbc_driver_sqlite/pyproject.toml
@@ -22,6 +22,9 @@ authors = [{name = "Apache Arrow Developers", email = "dev@arrow.apache.org"}]
license = {text = "Apache-2.0"}
requires-python = ">=3.9"
dynamic = ["version"]
+dependencies = [
+ "adbc-driver-manager",
+]
[project.optional-dependencies]
dbapi = ["pandas", "pyarrow>=8.0.0"]