python312Packages.skein: unbreak by patching distutils,
remove vendorized versioneer
This commit is contained in:
parent
623069cd15
commit
e953f33121
1 changed files with 14 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
, callPackage
|
||||
, fetchPypi
|
||||
, isPy27
|
||||
, pythonOlder
|
||||
, lib
|
||||
, cryptography
|
||||
, grpcio
|
||||
|
@ -10,6 +11,8 @@
|
|||
, hadoop
|
||||
, pytestCheckHook
|
||||
, python
|
||||
, setuptools
|
||||
, versioneer
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -25,7 +28,8 @@ buildPythonPackage rec {
|
|||
jarHash = "sha256-x2KH6tnoG7sogtjrJvUaxy0PCEA8q/zneuI969oBOKo=";
|
||||
skeinJar = callPackage ./skeinjar.nix { inherit pname version jarHash; };
|
||||
|
||||
propagatedBuildInputs = [ cryptography grpcio pyyaml ];
|
||||
propagatedBuildInputs = [ cryptography grpcio pyyaml ]
|
||||
++ lib.optionals (!pythonOlder "3.12") [ setuptools ];
|
||||
buildInputs = [ grpcio-tools ];
|
||||
|
||||
preBuild = ''
|
||||
|
@ -37,8 +41,17 @@ buildPythonPackage rec {
|
|||
postPatch = ''
|
||||
substituteInPlace skein/core.py --replace "'yarn'" "'${hadoop}/bin/yarn'" \
|
||||
--replace "else 'java'" "else '${hadoop.jdk}/bin/java'"
|
||||
# Remove vendorized versioneer
|
||||
rm versioneer.py
|
||||
'' + lib.optionalString (!pythonOlder "3.12") ''
|
||||
substituteInPlace skein/utils.py \
|
||||
--replace-fail "distutils" "setuptools._distutils"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
versioneer
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "skein" ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
|
Loading…
Reference in a new issue