From 17b05c63e87ad3061fe3f7bf3b12461d43190f4c Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:57:54 -0400 Subject: [PATCH] python3.pkgs.geoarrow-pandas: init at 0.1.2 --- .../geoarrow-pandas/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/geoarrow-pandas/default.nix diff --git a/pkgs/development/python-modules/geoarrow-pandas/default.nix b/pkgs/development/python-modules/geoarrow-pandas/default.nix new file mode 100644 index 0000000000000..cdf71922b509f --- /dev/null +++ b/pkgs/development/python-modules/geoarrow-pandas/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + pytestCheckHook, + pandas, + pyarrow, + geoarrow-pyarrow, + setuptools-scm, +}: +buildPythonPackage rec { + pname = "geoarrow-pandas"; + version = "0.1.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + repo = "geoarrow-python"; + owner = "geoarrow"; + rev = "refs/tags/geoarrow-pandas-${version}"; + hash = "sha256-Ni+GKTRhRDRHip1us3OZPuUhHQCNU7Nap865T/+CU8Y="; + }; + + sourceRoot = "${src.name}/geoarrow-pandas"; + + build-system = [ setuptools-scm ]; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + dependencies = [ + geoarrow-pyarrow + pandas + pyarrow + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "geoarrow.pandas" ]; + + meta = with lib; { + description = "Python implementation of the GeoArrow specification"; + homepage = "https://github.com/geoarrow/geoarrow-python"; + license = licenses.asl20; + maintainers = with maintainers; [ + cpcloud + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7fd6858f9d174..357c283bba659 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4968,6 +4968,8 @@ self: super: with self; { geoarrow-types = callPackage ../development/python-modules/geoarrow-types { }; + geoarrow-pandas = callPackage ../development/python-modules/geoarrow-pandas { }; + geoarrow-pyarrow = callPackage ../development/python-modules/geoarrow-pyarrow { }; geocachingapi = callPackage ../development/python-modules/geocachingapi { };