Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build-wheels-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,13 @@ jobs:
forge "$FORGE_ARCH" "$package"
done

# Drop the support-tree dep wheels produced by make_dep_wheels.py
# iOS deps: bzip2, libffi, mpdecimal, openssl, xz
# Android deps: bzip2, libffi, openssl, sqlite, xz
rm -f dist/bzip2-* dist/libffi-* dist/mpdecimal-* dist/openssl-* dist/sqlite-* dist/xz-*
- name: Drop support-tree dep wheels
if: always()
shell: bash
# Drop the CPython support-tree dep wheels produced by make_dep_wheels.py
# iOS deps: bzip2, libffi, mpdecimal, openssl, xz
# Android deps: bzip2, libffi, openssl, sqlite, xz
run: rm -f dist/bzip2-* dist/libffi-* dist/mpdecimal-* dist/openssl-* dist/sqlite-* dist/xz-*

- name: Summarize built wheels
if: always()
Expand Down
18 changes: 18 additions & 0 deletions recipes/oracledb/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package:
name: oracledb
version: 4.0.1

build:
number: 1

requirements:
# python-oracledb compiles four Cython extensions (base_impl, thin_impl,
# thick_impl, arrow_impl) from .pyx via setuptools+Cython. All native deps are
# vendored in the sdist (ODPI-C for thick mode, nanoarrow for arrow), so there
# is NO external native library to link — no flet-lib* host dep needed.
# `cryptography` (a shipped recipe) and `typing_extensions` (pure-Python) are
# runtime deps carried in the wheel metadata and resolved at app-build time.
# Thick mode dlopens the Oracle Instant Client at runtime only (absent on
# mobile); the default THIN mode is pure sockets and needs no client libs.
build:
- cython
29 changes: 29 additions & 0 deletions recipes/oracledb/tests/test_oracledb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
def test_import_and_thin_mode():
"""Loads all four Cython extensions — oracledb/__init__.py does
`from . import base_impl, thick_impl, thin_impl` (and arrow) at import, so
this proves every .so cross-compiled and loads. thick_impl loads WITHOUT the
Oracle Instant Client (ODPI-C dlopens it lazily, only on thick init), and the
default THIN mode needs no Oracle client libraries at all."""
import oracledb

assert oracledb.__version__
assert oracledb.is_thin_mode() is True


def test_thin_connect_errors_cleanly():
"""No DB server here — prove the thin driver's Cython network/protocol path
actually RUNS on-device by connecting to an unreachable listener and getting
a clean `oracledb.Error` (DB-API base), not an ImportError or native crash."""
import oracledb

try:
oracledb.connect(
user="x",
password="x",
dsn="127.0.0.1:1521/FREEPDB1",
tcp_connect_timeout=3,
)
except oracledb.Error:
pass # expected: nothing is listening, thin driver reports it cleanly
else:
raise AssertionError("expected a connection error against an unreachable DB")
Loading