Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

python312Packages.pycdio: drop nose dependency

+28 -30
+28 -30
pkgs/development/python-modules/pycdio/default.nix
··· 1 1 { 2 2 lib, 3 - stdenv, 4 3 buildPythonPackage, 5 - fetchPypi, 4 + fetchFromGitHub, 6 5 setuptools, 7 - nose, 8 - pkgs, 6 + pkg-config, 7 + swig, 8 + libcdio, 9 + libiconv, 10 + pytestCheckHook, 9 11 }: 10 12 11 13 buildPythonPackage rec { 12 14 pname = "pycdio"; 13 - version = "2.1.1"; 14 - format = "setuptools"; 15 + version = "2.1.1-unstable-2024-02-26"; 16 + pyproject = true; 15 17 16 - src = fetchPypi { 17 - inherit pname version; 18 - sha256 = "61734db8c554b7b1a2cb2da2e2c15d3f9f5973a57cfb06f8854c38029004a9f8"; 18 + src = fetchFromGitHub { 19 + owner = "rocky"; 20 + repo = "pycdio"; 21 + rev = "806c6a2eeeeb546055ce2ac9a0ae6a14ea53ae35"; # no tag for this version (yet) 22 + hash = "sha256-bOm82mBUIaw4BGHj3Y24Fv5+RfAew+Ma1u4QENXoRiU="; 19 23 }; 20 - 21 - prePatch = '' 22 - substituteInPlace setup.py \ 23 - --replace 'library_dirs=library_dirs' 'library_dirs=[dir.decode("utf-8") for dir in library_dirs]' \ 24 - --replace 'include_dirs=include_dirs' 'include_dirs=[dir.decode("utf-8") for dir in include_dirs]' \ 25 - --replace 'runtime_library_dirs=runtime_lib_dirs' 'runtime_library_dirs=[dir.decode("utf-8") for dir in runtime_lib_dirs]' 26 - ''; 27 24 28 25 preConfigure = '' 29 26 patchShebangs . 30 27 ''; 31 28 29 + build-system = [ setuptools ]; 30 + 32 31 nativeBuildInputs = [ 33 - nose 34 - pkgs.pkg-config 35 - pkgs.swig 32 + pkg-config 33 + swig 36 34 ]; 35 + 37 36 buildInputs = [ 38 - setuptools 39 - pkgs.libcdio 40 - ] ++ lib.optional stdenv.isDarwin pkgs.libiconv; 37 + libcdio 38 + libiconv 39 + ]; 40 + 41 + nativeCheckInputs = [ pytestCheckHook ]; 41 42 42 - # Run tests using nosetests but first need to install the binaries 43 - # to the root source directory where they can be found. 44 - checkPhase = '' 45 - ./setup.py install_lib -d . 46 - nosetests 47 - ''; 43 + pytestFlagsArray = [ "test/test-*.py" ]; 48 44 49 - meta = with lib; { 45 + meta = { 50 46 homepage = "https://www.gnu.org/software/libcdio/"; 47 + changelog = "https://github.com/rocky/pycdio/blob/${src.rev}/ChangeLog"; 51 48 description = "Wrapper around libcdio (CD Input and Control library)"; 52 - license = licenses.gpl3Plus; 49 + license = lib.licenses.gpl3Plus; 50 + maintainers = with lib.maintainers; [ sigmanificient ]; 53 51 }; 54 52 }