python3Packages.ldap3: refactor, use git src, run tests
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
{
|
||||
lib,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
buildPythonPackage,
|
||||
dos2unix,
|
||||
setuptools,
|
||||
pyasn1,
|
||||
unittestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ldap3";
|
||||
version = "2.9.1";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "f3e7fc4718e3f09dda568b57100095e0ce58633bcabbed8667ce3f8fbaa4229f";
|
||||
src = fetchFromGitHub {
|
||||
owner = "cannatag";
|
||||
repo = "ldap3";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-B+Sb6zMifkSKfaPYrXML5ugHGanbH5CPKeVdHshe3R4=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
@@ -33,12 +37,20 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [ dos2unix ];
|
||||
|
||||
propagatedBuildInputs = [ pyasn1 ];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
doCheck = false; # requires network
|
||||
dependencies = [ pyasn1 ];
|
||||
|
||||
nativeCheckInputs = [ unittestCheckHook ];
|
||||
|
||||
pytestFlagsArray = [ "test/" ];
|
||||
|
||||
preCheck = ''
|
||||
export SERVER=NONE
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pypi.python.org/pypi/ldap3";
|
||||
homepage = "https://github.com/cannatag/ldap3";
|
||||
description = "Strictly RFC 4510 conforming LDAP V3 pure Python client library";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = [ ];
|
||||
|
||||
Reference in New Issue
Block a user