Skip to content

Commit

Permalink
Merge pull request #311056 from mweinelt/pull-that-nose
Browse files Browse the repository at this point in the history
Migrate packages from nosetests
  • Loading branch information
mweinelt committed May 12, 2024
2 parents 239689b + 333fdca commit 3cec523
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/ansible-runner/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ buildPythonPackage rec {
hash = "sha256-eTnQkftvjK0YHU+ovotRVSuVlvaVeXp5SvYk1DPCg88=";
excludes = [ ".github/workflows/ci.yml" "tox.ini" ];
})
(fetchpatch {
# python 3.12 compat
url = "https://github.com/ansible/ansible-runner/commit/dc248497bb2375a363222ce755bf3a31f21d5f64.patch";
hash = "sha256-QT28Iw0uENoO35rqZpYBcmJB/GNDEF4m86SKf6p0XQU=";
})
];

build-system = [
Expand Down
28 changes: 19 additions & 9 deletions pkgs/development/python-modules/hid/default.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, hidapi
, nose
}:

buildPythonPackage rec {
pname = "hid";
version = "1.0.6";
format = "setuptools";
pyproject = true;

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

propagatedBuildInputs = [ hidapi ];

nativeCheckInputs = [ nose ];

postPatch = ''
hidapi=${hidapi}/lib/
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py
hidapi=${hidapi}/lib/
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py
'';

build-system = [
setuptools
];

dependencies = [
hidapi
];

doCheck = false; # no tests

pythonImportsCheck = [
"hid"
];

meta = with lib; {
description = "hidapi bindings in ctypes";
homepage = "https://github.com/apmorton/pyhidapi";
Expand Down
15 changes: 11 additions & 4 deletions pkgs/development/python-modules/lockfile/default.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, pbr
, nose
, pynose
}:

buildPythonPackage rec {
pname = "lockfile";
version = "0.12.2";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799";
};

buildInputs = [ pbr ];
nativeCheckInputs = [ nose ];
build-system = [
pbr
setuptools
];

nativeCheckInputs = [ pynose ];

checkPhase = ''
runHook preCheck
nosetests
runHook postcheck
'';

meta = with lib; {
Expand Down
17 changes: 12 additions & 5 deletions pkgs/development/python-modules/opuslib/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{ buildPythonPackage,
{
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
isPy27,
libopus,
nose,
lib, stdenv,
pynose,
lib,
stdenv,
substituteAll,
setuptools,
}:

buildPythonPackage rec {
pname = "opuslib";
version = "3.0.3";
format = "setuptools";
pyproject = true;

disabled = isPy27;

Expand Down Expand Up @@ -41,7 +44,11 @@ buildPythonPackage rec {
})
];

nativeCheckInputs = [ nose ];
build-system = [
setuptools
];

nativeCheckInputs = [ pynose ];

meta = with lib; {
description = "Python bindings to the libopus, IETF low-delay audio codec";
Expand Down

0 comments on commit 3cec523

Please sign in to comment.