{ buildPythonPackage, lib, poetry-core, pytestCheckHook, pytz, pyswisseph, pydantic, requests, requests-cache, scour, simple-ascii-tables, typing-extensions, sources, setuptools, }: buildPythonPackage rec { pname = "kerykeion"; version = sources.kerykeion.version; pyproject = true; src = sources.kerykeion; nativeBuildInputs = [poetry-core]; propagatedBuildInputs = [ pyswisseph pydantic scour requests-cache requests simple-ascii-tables pytz typing-extensions setuptools ]; preBuild = '' cat <> pyproject.toml [project] name = "kerykeion" version = "${sources.kerykeion.version}" [tool.setuptools.packages.find] where = ["."] include = ["kerykeion*", "tests"] namespaces = false [build-system] build-backend = "setuptools.build_meta" requires = ["setuptools"] EOF ''; nativeCheckInputs = [pytestCheckHook]; pythonImportsCheck = ["kerykeion"]; # almost all tests perform network requests to api.geonames.org enabledTests = [ "test_ephemeris_data" "test_settings" ]; meta = with lib; { homepage = "https://www.kerykeion.net/"; description = "A python library for astrology"; changelog = "https://github.com/g-battaglia/kerykeion/releases/tag/v${version}"; license = licenses.agpl3Only; maintainers = with maintainers; [bsima]; }; }