From d4fd65dcb6a6e8ab76d53998378c3bd8f92c6a46 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Mon, 21 Aug 2023 22:59:27 -0700 Subject: [PATCH] python3.pkgs.pypiserver: add pip dependency and audit tests --- .../python-modules/pypiserver/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pypiserver/default.nix b/pkgs/development/python-modules/pypiserver/default.nix index e892a8227c3d..6e948d7bb293 100644 --- a/pkgs/development/python-modules/pypiserver/default.nix +++ b/pkgs/development/python-modules/pypiserver/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , passlib +, pip , pytestCheckHook , pythonOlder , setuptools @@ -9,6 +10,7 @@ , twine , watchdog , webtest +, wheel }: buildPythonPackage rec { @@ -26,11 +28,13 @@ buildPythonPackage rec { }; nativeBuildInputs = [ + setuptools setuptools-git + wheel ]; propagatedBuildInputs = [ - setuptools + pip ]; passthru.optional-dependencies = { @@ -42,12 +46,21 @@ buildPythonPackage rec { ]; }; + __darwinAllowLocalNetworking = true; + + # Tests need these permissions in order to use the FSEvents API on macOS. + sandboxProfile = '' + (allow mach-lookup (global-name "com.apple.FSEvents")) + ''; + preCheck = '' export HOME=$TMPDIR ''; nativeCheckInputs = [ + pip pytestCheckHook + setuptools twine webtest ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); @@ -57,11 +70,6 @@ buildPythonPackage rec { "test_hash_algos" "test_pip_install_authed_succeeds" "test_pip_install_open_succeeds" - "test_pip_install_authed_fails" - # Tests want to tests upload - "upload" - "register" - "test_partial_authed_open_download" ]; disabledTestPaths = [