diff --git a/pkgs/development/python-modules/audio-metadata/default.nix b/pkgs/development/python-modules/audio-metadata/default.nix index d1d6de0bcba8..e9be3715ec31 100644 --- a/pkgs/development/python-modules/audio-metadata/default.nix +++ b/pkgs/development/python-modules/audio-metadata/default.nix @@ -1,28 +1,29 @@ -{ lib -, attrs -, bidict -, bitstruct -, buildPythonPackage -, fetchFromGitHub -, fetchpatch -, more-itertools -, poetry-core -, pprintpp -, pythonOlder -, pythonRelaxDepsHook -, tbm-utils +{ + lib, + attrs, + bidict, + bitstruct, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + more-itertools, + poetry-core, + pprintpp, + pythonOlder, + pythonRelaxDepsHook, + tbm-utils, }: buildPythonPackage rec { pname = "audio-metadata"; version = "0.11.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "thebigmunch"; - repo = pname; + repo = "audio-metadata"; rev = "refs/tags/${version}"; hash = "sha256-5ZX4HwbuB9ZmFfHuxaMCrn3R7/znuDsoyqqLql2Nizg="; }; @@ -41,12 +42,11 @@ buildPythonPackage rec { "more-itertools" ]; - nativeBuildInputs = [ - poetry-core - pythonRelaxDepsHook - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + dependencies = [ attrs bidict bitstruct @@ -58,13 +58,11 @@ buildPythonPackage rec { # Tests require ward which is not ready to be used doCheck = false; - pythonImportsCheck = [ - "audio_metadata" - ]; + pythonImportsCheck = [ "audio_metadata" ]; meta = with lib; { + description = "Library for handling the metadata from audio files"; homepage = "https://github.com/thebigmunch/audio-metadata"; - description = "A library for reading and, in the future, writing metadata from audio files"; changelog = "https://github.com/thebigmunch/audio-metadata/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ jakewaksbaum ]; diff --git a/pkgs/development/python-modules/pprintpp/default.nix b/pkgs/development/python-modules/pprintpp/default.nix index c0f98eca75e1..0e058cab0560 100644 --- a/pkgs/development/python-modules/pprintpp/default.nix +++ b/pkgs/development/python-modules/pprintpp/default.nix @@ -1,17 +1,20 @@ -{ lib -, buildPythonPackage -, fetchpatch -, fetchPypi -, nose -, parameterized -, python -, pythonOlder +{ + lib, + buildPythonPackage, + fetchpatch, + fetchPypi, + parameterized, + pytestCheckHook, + pynose, + python, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "pprintpp"; version = "0.4.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -34,25 +37,31 @@ buildPythonPackage rec { }) ]; + build-system = [ setuptools ]; + nativeCheckInputs = [ - nose parameterized + pynose + pytestCheckHook ]; - checkPhase = '' - ${python.interpreter} test.py - ''; + pythonImportsCheck = [ "pprintpp" ]; - pythonImportsCheck = [ - "pprintpp" + pytestFlagsArray = [ "test.py" ]; + + disabledTests = [ + # AttributeError: 'EncodedFile' object has no attribute 'getvalue' + "test_pp" + "test_pp_pprint" + "test_fmt" ]; meta = with lib; { description = "A drop-in replacement for pprint that's actually pretty"; - mainProgram = "pypprint"; homepage = "https://github.com/wolever/pprintpp"; changelog = "https://github.com/wolever/pprintpp/blob/${version}/CHANGELOG.txt"; license = licenses.bsd2; maintainers = with maintainers; [ jakewaksbaum ]; + mainProgram = "pypprint"; }; } diff --git a/pkgs/development/python-modules/tbm-utils/default.nix b/pkgs/development/python-modules/tbm-utils/default.nix index 4fa46defe2cb..7f4963ca6dba 100644 --- a/pkgs/development/python-modules/tbm-utils/default.nix +++ b/pkgs/development/python-modules/tbm-utils/default.nix @@ -1,38 +1,58 @@ -{ stdenv -, lib -, buildPythonPackage -, fetchFromGitHub -, attrs -, pendulum -, poetry-core -, pprintpp -, pytestCheckHook -, pythonRelaxDepsHook -, wrapt +{ + lib, + stdenv, + attrs, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + pendulum, + poetry-core, + pprintpp, + pytestCheckHook, + pythonOlder, + pythonRelaxDepsHook, + wrapt, }: buildPythonPackage rec { pname = "tbm-utils"; version = "2.6.0"; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "thebigmunch"; - repo = pname; + repo = "tbm-utils"; rev = "refs/tags/${version}"; hash = "sha256-AEKawsAxDSDNkIaXEFFgdEBOY2PpASDrhlDrsnM5eyA="; }; + patches = [ + # Migrate to pendulum > 3, https://github.com/thebigmunch/tbm-utils/pull/3 + (fetchpatch { + name = "support-pendulum-3.patch"; + url = "https://github.com/thebigmunch/tbm-utils/commit/473534fae2d9a8dea9100cead6c54cab3f5cd0cd.patch"; + hash = "sha256-3T0KhSmO9r1vM67FWEnTZMQV4b5jS2xtPHI0t9NnCmI="; + }) + (fetchpatch { + name = "update-testsupport-pendulum-3.patch"; + url = "https://github.com/thebigmunch/tbm-utils/commit/a0331d0c15f11cd26bfbb42eebd17296167161ed.patch"; + hash = "sha256-KG6yfnnBltavbNvIBTdbK+CPXwZTLYl14925RY2a8vs="; + }) + ]; + postPatch = '' substituteInPlace pyproject.toml \ - --replace 'poetry>=1.0.0' 'poetry-core' \ - --replace 'poetry.masonry.api' 'poetry.core.masonry.api' + --replace-fail 'poetry>=1.0.0' 'poetry-core' \ + --replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' ''; - nativeBuildInputs = [ - poetry-core - pythonRelaxDepsHook - ]; + pythonRelaxDeps = [ "attrs" ]; + + build-system = [ poetry-core ]; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; propagatedBuildInputs = [ attrs @@ -41,13 +61,7 @@ buildPythonPackage rec { wrapt ]; - pythonRelaxDeps = [ - "attrs" - ]; - - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; disabledTests = lib.optionals stdenv.isDarwin [ # Skip on macOS because /etc/localtime is accessed through the pendulum @@ -63,14 +77,13 @@ buildPythonPackage rec { "tests/test_misc.py" ]; - pythonImportsCheck = [ - "tbm_utils" - ]; + pythonImportsCheck = [ "tbm_utils" ]; - meta = { + meta = with lib; { description = "A commonly-used set of utilities"; homepage = "https://github.com/thebigmunch/tbm-utils"; changelog = "https://github.com/thebigmunch/tbm-utils/blob/${version}/CHANGELOG.md"; - license = [ lib.licenses.mit ]; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/ward/default.nix b/pkgs/development/python-modules/ward/default.nix index f73cae95e25e..b1f7345f8413 100644 --- a/pkgs/development/python-modules/ward/default.nix +++ b/pkgs/development/python-modules/ward/default.nix @@ -9,35 +9,29 @@ , poetry-core , pprintpp , pythonOlder -, pythonRelaxDepsHook , rich , tomli }: buildPythonPackage rec { pname = "ward"; - version = "0.67.0b0"; - format = "pyproject"; + version = "0.68.0b0"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "darrenburns"; - repo = pname; + repo = "ward"; rev = "refs/tags/release%2F${version}"; hash = "sha256-4dEMEEPySezgw3dIcYMl56HrhyaYlql9JvtamOn7Y8g="; }; - pythonRelaxDeps = [ - "rich" - ]; - - nativeBuildInputs = [ + build-system = [ poetry-core - pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ click rich tomli @@ -57,10 +51,10 @@ buildPythonPackage rec { meta = with lib; { description = "Test framework for Python"; - mainProgram = "ward"; homepage = "https://github.com/darrenburns/ward"; changelog = "https://github.com/darrenburns/ward/releases/tag/release%2F${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; + mainProgram = "ward"; }; }