nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 68 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pytest-asyncio, 7 pytest-cov-stub, 8 pytestCheckHook, 9 pythonOlder, 10 setuptools, 11}: 12 13# This package provides a binary "apython" which sometimes invokes 14# [sys.executable, '-m', 'aioconsole'] as a subprocess. If apython is 15# run directly out of this derivation, it won't work, because 16# sys.executable will point to a Python binary that is not wrapped to 17# be able to find aioconsole. 18# However, apython will work fine when using python##.withPackages, 19# because with python##.withPackages the sys.executable is already 20# wrapped to be able to find aioconsole and any other packages. 21buildPythonPackage rec { 22 pname = "aioconsole"; 23 version = "0.8.2"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "vxgmichel"; 28 repo = "aioconsole"; 29 tag = "v${version}"; 30 hash = "sha256-j4nzt8mvn+AYObh1lvgxS8wWK662KN+OxjJ2b5ZNAcQ="; 31 }; 32 33 postPatch = '' 34 substituteInPlace pyproject.toml \ 35 --replace-fail " --strict-markers --count 2 -vv" "" 36 ''; 37 38 build-system = [ setuptools ]; 39 40 nativeCheckInputs = [ 41 pytest-asyncio 42 pytest-cov-stub 43 pytestCheckHook 44 ]; 45 46 __darwinAllowLocalNetworking = true; 47 48 disabledTests = [ 49 "test_interact_syntax_error" 50 # Output and the sandbox don't work well together 51 "test_interact_multiple_indented_lines" 52 ]; 53 54 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 55 # OSError: AF_UNIX path too long 56 "tests/test_server.py::test_uds_server[default]" 57 ]; 58 59 pythonImportsCheck = [ "aioconsole" ]; 60 61 meta = { 62 description = "Asynchronous console and interfaces for asyncio"; 63 changelog = "https://github.com/vxgmichel/aioconsole/releases/tag/v${version}"; 64 homepage = "https://github.com/vxgmichel/aioconsole"; 65 license = lib.licenses.gpl3Only; 66 mainProgram = "apython"; 67 }; 68}