diff --git a/pkgs/development/python-modules/price-parser/default.nix b/pkgs/development/python-modules/price-parser/default.nix new file mode 100644 index 000000000000..c2baaced3afb --- /dev/null +++ b/pkgs/development/python-modules/price-parser/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, + pytest-cov, + attrs, +}: + +buildPythonPackage rec { + pname = "price-parser"; + version = "0.4.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "scrapinghub"; + repo = "price-parser"; + tag = version; + hash = "sha256-9f/+Yw94SVvg9fl9zYR9YEMwAgKHwySG5cysPMomnA0="; + }; + + dependencies = [ attrs ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov + ]; + + pythonImportsCheck = [ "price_parser" ]; + + meta = { + description = "Extract price amount and currency symbol from a raw text string"; + homepage = "https://github.com/scrapinghub/price-parser"; + changelog = "https://github.com/scrapinghub/price-parser/blob/${version}/CHANGES.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ thanegill ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 84a5c26d774b..f03edcc57ae6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12151,6 +12151,8 @@ self: super: with self; { prettytable = callPackage ../development/python-modules/prettytable { }; + price-parser = callPackage ../development/python-modules/price-parser { }; + primecountpy = callPackage ../development/python-modules/primecountpy { }; primepy = callPackage ../development/python-modules/primepy { };