Skip to content

Commit

Permalink
python312Packages.pycdio: drop nose dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Aug 10, 2024
1 parent 9d21d8a commit 8b34e94
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions pkgs/development/python-modules/pycdio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
buildPythonPackage,
fetchPypi,
setuptools,
nose,
pkgs,
pkg-config,
swig,
libcdio,
libiconv,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "pycdio";
version = "2.1.1";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
Expand All @@ -29,23 +32,32 @@ buildPythonPackage rec {
patchShebangs .
'';

build-system = [ setuptools ];

nativeBuildInputs = [
nose
pkgs.pkg-config
pkgs.swig
pkg-config
swig
];

buildInputs = [
setuptools
pkgs.libcdio
] ++ lib.optional stdenv.isDarwin pkgs.libiconv;

# Run tests using nosetests but first need to install the binaries
# to the root source directory where they can be found.
checkPhase = ''
./setup.py install_lib -d .
nosetests
libcdio
libiconv
];

nativeCheckInputs = [ pytestCheckHook ];

preCheck = ''
substituteInPlace test/test-cdtext.py \
--replace-fail "assertEquals" "assertEqual"
'';

pytestFlagsArray = [
"test/test-cdio.py"
"test/test-cdtext.py"
"test/test-iso.py"
"test/test-isocopy.py"
];

meta = with lib; {
homepage = "https://www.gnu.org/software/libcdio/";
description = "Wrapper around libcdio (CD Input and Control library)";
Expand Down

0 comments on commit 8b34e94

Please sign in to comment.