Skip to content

Commit

Permalink
python312Package.{fabric,paramiko}: modernize and fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
pluiedev committed Oct 26, 2024
1 parent 08c5673 commit c53c9bf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
26 changes: 11 additions & 15 deletions pkgs/development/python-modules/fabric/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,53 @@
lib,
buildPythonPackage,
fetchPypi,
cryptography,
setuptools,
decorator,
deprecated,
invoke,
mock,
paramiko,
pytestCheckHook,
pytest-relaxed,
icecream,
}:

buildPythonPackage rec {
pname = "fabric";
version = "3.2.2";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-h4PKQuOwB28IsmkBqsa52bHxnEEAdOesz6uQLBhP9KM=";
};

# only relevant to python < 3.4
postPatch = ''
substituteInPlace setup.py \
--replace ', "pathlib2"' ' '
'';
build-system = [ setuptools ];

propagatedBuildInputs = [
dependencies = [
invoke
paramiko
cryptography
decorator
deprecated
];

nativeCheckInputs = [
pytestCheckHook
pytest-relaxed
icecream
mock
];

# ==================================== ERRORS ====================================
# ________________________ ERROR collecting test session _________________________
# Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent
# See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
# distutils.errors.DistutilsArgError: no commands supplied
doCheck = false;

pythonImportsCheck = [ "fabric" ];

meta = with lib; {
meta = {
description = "Pythonic remote execution";
mainProgram = "fab";
homepage = "https://www.fabfile.org/";
license = licenses.bsd2;
license = lib.licenses.bsd2;
maintainers = [ ];
};
}
20 changes: 8 additions & 12 deletions pkgs/development/python-modules/paramiko/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
lib,
stdenv,
bcrypt,
buildPythonPackage,
cryptography,
fetchpatch,
fetchPypi,
setuptools,
gssapi,
icecream,
invoke,
Expand All @@ -13,13 +15,12 @@
pynacl,
pytestCheckHook,
pytest-relaxed,
six,
}:

buildPythonPackage rec {
pname = "paramiko";
version = "3.5.0";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
Expand All @@ -35,22 +36,17 @@ buildPythonPackage rec {
})
];

build-system = [ setuptools ];

dependencies = [
bcrypt
cryptography
pyasn1
six
pynacl
];

optional-dependencies = {
gssapi = [
pyasn1
gssapi
];
ed25519 = [
pynacl
bcrypt
];
gssapi = [ pyasn1 ] ++ lib.optional (!stdenv.hostPlatform.isWindows) [ gssapi ];
ed25519 = [ ];
invoke = [ invoke ];
};

Expand Down

0 comments on commit c53c9bf

Please sign in to comment.