nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 hypothesis,
7 pytest-xdist,
8 pytestCheckHook,
9 typing-extensions,
10 wheel,
11}:
12
13buildPythonPackage rec {
14 pname = "bidict";
15 version = "0.23.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "jab";
20 repo = "bidict";
21 tag = "v${version}";
22 hash = "sha256-WE0YaRT4a/byvU2pzcByuf1DfMlOpYA9i0PPrKXsS+M=";
23 };
24
25 build-system = [
26 setuptools
27 wheel
28 ];
29
30 nativeCheckInputs = [
31 hypothesis
32 pytest-xdist
33 pytestCheckHook
34 typing-extensions
35 ];
36
37 # Remove the bundled pytest.ini, which adds options to run additional integration
38 # tests that are overkill for our purposes.
39 preCheck = ''
40 rm pytest.ini
41 '';
42
43 pythonImportsCheck = [ "bidict" ];
44
45 meta = {
46 homepage = "https://bidict.readthedocs.io";
47 changelog = "https://bidict.readthedocs.io/changelog.html";
48 description = "Bidirectional mapping library for Python";
49 license = lib.licenses.mpl20;
50 maintainers = with lib.maintainers; [
51 jab
52 jakewaksbaum
53 ];
54 };
55}