-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python311Packages.connectorx: init at 0.3.3
- Loading branch information
1 parent
0e8141c
commit 4d03c1a
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ lib, buildPythonPackage, rustPlatform, pytestCheckHook, | ||
|
||
fetchFromGitHub, | ||
|
||
krb5, openssl, | ||
|
||
libkrb5, }: | ||
buildPythonPackage rec { | ||
pname = "connectorx"; | ||
version = "0.3.3"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "sfu-db"; | ||
repo = "connector-x"; | ||
rev = "v${version}"; | ||
hash = "sha256-L/tI2Lux+UnXZrpBxXX193pvb34hr5kqWo0Ncb1V+R0="; | ||
}; | ||
|
||
sourceRoot = "${src.name}/connectorx-python"; | ||
|
||
cargoDeps = rustPlatform.fetchCargoTarball { | ||
inherit src sourceRoot; | ||
name = "${pname}-python-${version}"; | ||
hash = "sha256-zeBYQXqCb/KXth+QG0n2yUZ1D6JNseEw+ru3xX04zts="; | ||
}; | ||
|
||
env = { | ||
# needed for openssl-sys | ||
OPENSSL_NO_VENDOR = 1; | ||
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib"; | ||
OPENSSL_DIR = "${lib.getDev openssl}"; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
krb5 # needed for `krb5-config` during libgssapi-sys | ||
|
||
rustPlatform.cargoSetupHook | ||
rustPlatform.maturinBuildHook | ||
rustPlatform.bindgenHook | ||
]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
buildInputs = [ | ||
libkrb5 # needed for libgssapi-sys | ||
openssl # needed for openssl-sys | ||
]; | ||
|
||
pythonImportsCheck = [ "connectorx" ]; | ||
|
||
meta = { | ||
description = | ||
"Fastest library to load data from DB to DataFrames in Rust and Python"; | ||
homepage = "https://sfu-db.github.io/connector-x"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ coastalwhite ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters