diff --git a/pkgs/development/python-modules/bitmath/default.nix b/pkgs/development/python-modules/bitmath/default.nix index 52213081e0f5..87c00c52e548 100644 --- a/pkgs/development/python-modules/bitmath/default.nix +++ b/pkgs/development/python-modules/bitmath/default.nix @@ -1,33 +1,35 @@ { lib, buildPythonPackage, - fetchPypi, - isPy3k, - progressbar231 ? null, - progressbar33, - mock, + fetchFromGitHub, + hatchling, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "bitmath"; - version = "1.3.3.1"; - format = "setuptools"; + version = "2.1.1"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "293325f01e65defe966853111df11d39215eb705a967cb115851da8c4cfa3eb8"; + src = fetchFromGitHub { + owner = "timlnx"; + repo = "bitmath"; + tag = "v${finalAttrs.version}"; + hash = "sha256-9hiwIpDIAU+N+LhlJ9qlKBZQibbrwwhGM77fvEnABRI="; }; - nativeCheckInputs = [ - (if isPy3k then progressbar33 else progressbar231) - mock - ]; + build-system = [ hatchling ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "bitmath" ]; meta = { description = "Module for representing and manipulating file sizes with different prefix"; - mainProgram = "bitmath"; - homepage = "https://github.com/tbielawa/bitmath"; + homepage = "https://github.com/timlnx/bitmath"; + changelog = "https://github.com/timlnx/bitmath/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ twey ]; + mainProgram = "bitmath"; }; -} +}) diff --git a/pkgs/development/python-modules/osxphotos/default.nix b/pkgs/development/python-modules/osxphotos/default.nix index 6b1c02676856..cd42a619f65f 100644 --- a/pkgs/development/python-modules/osxphotos/default.nix +++ b/pkgs/development/python-modules/osxphotos/default.nix @@ -17,6 +17,7 @@ pathvalidate, pip, ptpython, + psutil, pytimeparse2, pyyaml, requests, @@ -41,17 +42,29 @@ buildPythonPackage (finalAttrs: { pname = "osxphotos"; - version = "0.75.1"; + version = "0.75.9"; pyproject = true; src = fetchFromGitHub { owner = "RhetTbull"; repo = "osxphotos"; tag = "v${finalAttrs.version}"; - hash = "sha256-aX+4wgjqWxoIez/pJ7ioes5OTHFijztSFTvTxdND6Eo="; + hash = "sha256-9oQ9yLNHACLgOegNRcuysGIo8cbYLhlkNa41Y+YHFTM="; }; + pythonRelaxDeps = [ + "bitmath" + "mako" + "more-itertools" + "objexplore" + "rich" + "textx" + "tenacity" + "whenever" + ]; + build-system = [ setuptools ]; + dependencies = [ beautifulsoup4 bitmath @@ -64,12 +77,13 @@ buildPythonPackage (finalAttrs: { packaging pathvalidate pip + psutil ptpython pytimeparse2 pyyaml requests - rich-theme-manager rich + rich-theme-manager shortuuid strpdatetime tenacity @@ -83,16 +97,8 @@ buildPythonPackage (finalAttrs: { xdg-base-dirs ]; - pythonRelaxDeps = [ - "mako" - "more-itertools" - "objexplore" - "rich" - "textx" - "tenacity" - ]; - pythonImportsCheck = [ "osxphotos" ]; + nativeCheckInputs = [ pytestCheckHook pytest-mock