evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pypiserver / default.nix
blob6202ae3156cf080b571458b3c989ee660070fa71
2   lib,
3   buildPythonPackage,
4   distutils,
5   fetchFromGitHub,
6   passlib,
7   pip,
8   pytestCheckHook,
9   pythonOlder,
10   setuptools-git,
11   setuptools,
12   twine,
13   watchdog,
14   webtest,
15   wheel,
16   build,
17   importlib-resources,
20 buildPythonPackage rec {
21   pname = "pypiserver";
22   version = "2.2.0";
23   pyproject = true;
25   disabled = pythonOlder "3.7";
27   src = fetchFromGitHub {
28     owner = "pypiserver";
29     repo = "pypiserver";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-5GJthS3kWOyWvYW+mYnIcNKD3fgSVexABZ+DpVh7qkE=";
32   };
34   build-system = [
35     setuptools
36     setuptools-git
37     wheel
38   ];
40   dependencies = [
41     distutils
42     pip
43   ] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ];
45   optional-dependencies = {
46     passlib = [ passlib ];
47     cache = [ watchdog ];
48   };
50   nativeCheckInputs = [
51     pip
52     pytestCheckHook
53     setuptools
54     twine
55     webtest
56     build
57   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
59   __darwinAllowLocalNetworking = true;
61   # Tests need these permissions in order to use the FSEvents API on macOS.
62   sandboxProfile = ''
63     (allow mach-lookup (global-name "com.apple.FSEvents"))
64   '';
66   preCheck = ''
67     export HOME=$TMPDIR
68   '';
70   disabledTests = [
71     # Fails to install the package
72     "test_hash_algos"
73     "test_pip_install_authed_succeeds"
74     "test_pip_install_open_succeeds"
75   ];
77   disabledTestPaths = [
78     # Test requires docker service running
79     "docker/test_docker.py"
80   ];
82   pythonImportsCheck = [ "pypiserver" ];
84   meta = with lib; {
85     description = "Minimal PyPI server for use with pip/easy_install";
86     homepage = "https://github.com/pypiserver/pypiserver";
87     changelog = "https://github.com/pypiserver/pypiserver/releases/tag/v${version}";
88     license = with licenses; [
89       mit
90       zlib
91     ];
92     maintainers = with maintainers; [ austinbutler ];
93     mainProgram = "pypi-server";
94   };