diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiofiles/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/aiofiles/default.nix | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiofiles/default.nix b/nixpkgs/pkgs/development/python-modules/aiofiles/default.nix index ffa176edc8dc..05027dc0170d 100644 --- a/nixpkgs/pkgs/development/python-modules/aiofiles/default.nix +++ b/nixpkgs/pkgs/development/python-modules/aiofiles/default.nix @@ -1,22 +1,41 @@ -{ lib +{ stdenv +, lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "aiofiles"; version = "0.7.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "Tinche"; + repo = pname; + rev = "v${version}"; + sha256 = "0vvk9j8cfdqvq8hw2qc6ajfzsy8x1afabf83mxafffq92rwknd4y"; }; - disabled = pythonOlder "3.3"; + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + disabledTests = lib.optionals stdenv.isDarwin [ + "test_sendfile_file" + ]; - # No tests in archive - doCheck = false; + pythonImportsCheck = [ "aiofiles" ]; meta = { description = "File support for asyncio"; |