python3Packages.oracledb: fix build and modernize

This commit is contained in:
dish
2025-08-24 10:52:15 -04:00
parent 22898b0897
commit 6499992bd3
@@ -3,7 +3,7 @@
buildPythonPackage,
cryptography,
cython,
fetchPypi,
fetchFromGitHub,
pythonOlder,
setuptools,
wheel,
@@ -14,13 +14,21 @@ buildPythonPackage rec {
version = "3.3.0";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-6DDTVEoVeClryqVMboyK4QpYx9tGfFKMSyetv5yLTLA=";
src = fetchFromGitHub {
owner = "oracle";
repo = "python-oracledb";
tag = "v${version}";
fetchSubmodules = true;
hash = "sha256-SHIEl4pzuQBJ02KRPmOydFtmVD9qF3LGk9WPiDSpVzQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "cython == 3.1" "cython"
'';
build-system = [
cython
setuptools
@@ -34,14 +42,14 @@ buildPythonPackage rec {
pythonImportsCheck = [ "oracledb" ];
meta = with lib; {
meta = {
description = "Python driver for Oracle Database";
homepage = "https://oracle.github.io/python-oracledb";
changelog = "https://github.com/oracle/python-oracledb/blob/v${version}/doc/src/release_notes.rst";
license = with licenses; [
license = with lib.licenses; [
asl20 # and or
upl
];
maintainers = with maintainers; [ harvidsen ];
maintainers = with lib.maintainers; [ harvidsen ];
};
}