nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pg8000, 7 psycopg, 8 pytest-asyncio, 9 pytest-postgresql, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13 setuptools-scm, 14 sphinx-rtd-theme, 15 sphinxHook, 16}: 17 18buildPythonPackage rec { 19 pname = "aiosql"; 20 version = "15.0"; 21 pyproject = true; 22 23 outputs = [ 24 "out" 25 "doc" 26 ]; 27 28 src = fetchFromGitHub { 29 owner = "nackjicholson"; 30 repo = "aiosql"; 31 tag = version; 32 hash = "sha256-zKKp37tM0pBnWJuLmQhoQpWnUinLG/Nmnpv1rdM8wYM="; 33 }; 34 35 sphinxRoot = "docs/source"; 36 37 nativeBuildInputs = [ 38 setuptools 39 setuptools-scm 40 sphinx-rtd-theme 41 sphinxHook 42 ]; 43 44 nativeCheckInputs = [ 45 pg8000 46 psycopg 47 pytest-asyncio 48 pytest-postgresql 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ "aiosql" ]; 53 54 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 55 # Tests that require port binding fail in darwin sandbox 56 # port_for.exceptions.PortForException: Can't select a port 57 "tests/test_pg8000.py" 58 "tests/test_apsycopg3.py" 59 "tests/test_psycopg3.py" 60 ]; 61 62 meta = { 63 description = "Simple SQL in Python"; 64 homepage = "https://nackjicholson.github.io/aiosql/"; 65 changelog = "https://github.com/nackjicholson/aiosql/releases/tag/${src.tag}"; 66 license = with lib.licenses; [ bsd2 ]; 67 maintainers = with lib.maintainers; [ kaction ]; 68 }; 69}