summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/base36/default.nix
blob: 69555c07ce7126f4110b03a57b0e97f38a55a985 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "base36";
  version = "0.1.1";
  pyproject = true;

  __structuredAttrs = true;

  src = fetchFromGitHub {
    owner = "tonyseek";
    repo = "python-base36";
    tag = "v${finalAttrs.version}";
    hash = "sha256-Jd9bQxTlb2ZsWmtHmCtx8FdWZMRqfvyFfnV+oNOs1hw=";
  };

  build-system = [ setuptools ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail "[pytest]" "[tool:pytest]" \
      --replace-fail "--pep8 --cov" ""
  '';

  nativeCheckInputs = [ pytestCheckHook ];

  enabledTestPaths = [ "test_base36.py" ];
  pythonImportsCheck = [ "base36" ];

  meta = {
    description = "Python implementation for the positional numeral system using 36 as the radix";
    homepage = "https://github.com/tonyseek/python-base36";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
})