summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/price-parser/default.nix
blob: ecbed54a7c363cbc743c57d06f9ca968e3a7b4f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  gitUpdater,
  pytestCheckHook,
  setuptools,
  pytest-cov-stub,
  attrs,
}:

buildPythonPackage rec {
  pname = "price-parser";
  version = "0.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "scrapinghub";
    repo = "price-parser";
    tag = version;
    hash = "sha256-9f/+Yw94SVvg9fl9zYR9YEMwAgKHwySG5cysPMomnA0=";
  };

  build-system = [ setuptools ];

  dependencies = [ attrs ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
  ];

  pythonImportsCheck = [ "price_parser" ];

  passthru.updateScript = gitUpdater { };

  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 ];
  };
}