Merge pull request #268130 from imincik/geos-3.12.1

geos: 3.11.2 -> 3.12.1
This commit is contained in:
Jonas Chevalier
2023-12-14 11:12:15 +01:00
committed by GitHub
10 changed files with 106 additions and 49 deletions
+3 -5
View File
@@ -16,13 +16,10 @@
, pcbnew-transition
, pybars3
, versioneer
, shapely_1_8
}:
let
solidpython = callPackage ./solidpython { };
# https://github.com/yaqwsx/KiKit/issues/574
# copy-pasted from nixpkgs#8d8e62e74f511160a599471549a98bc9e4f4818d
shapely = callPackage ./shapely { };
in
buildPythonApplication rec {
pname = "kikit";
@@ -48,7 +45,8 @@ buildPythonApplication rec {
wxPython_4_2
pcbnew-transition
pybars3
shapely
# https://github.com/yaqwsx/KiKit/issues/574
shapely_1_8
# https://github.com/yaqwsx/KiKit/issues/576
solidpython
];
+47
View File
@@ -0,0 +1,47 @@
{ lib
, stdenv
, callPackage
, fetchpatch
, fetchurl
, testers
, cmake
}:
stdenv.mkDerivation (finalAttrs: {
pname = "geos";
version = "3.11.2";
src = fetchurl {
url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
hash = "sha256-sfB3ZpSBxaPmKv/EnpbrBvKBmHpdNv2rIlIX5bgl5Mw=";
};
patches = [
# Pull upstream fix of `gcc-13` build failure:
# https://github.com/libgeos/geos/pull/805
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch";
hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM=";
})
];
nativeBuildInputs = [ cmake ];
doCheck = true;
passthru.tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
};
meta = with lib; {
description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
homepage = "https://libgeos.org";
license = licenses.lgpl21Only;
maintainers = teams.geospatial.members;
pkgConfigModules = [ "geos" ];
mainProgram = "geosop";
};
})
+4 -14
View File
@@ -1,7 +1,6 @@
{ lib
, stdenv
, callPackage
, fetchpatch
, fetchurl
, testers
@@ -10,23 +9,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "geos";
version = "3.11.2";
version = "3.12.1";
src = fetchurl {
url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
hash = "sha256-sfB3ZpSBxaPmKv/EnpbrBvKBmHpdNv2rIlIX5bgl5Mw=";
hash = "sha256-1up+SSIktRGT6CRP4+wXxNRNB3fzwyyk+xcRQFSaDQM=";
};
patches = [
# Pull upstream fix of `gcc-13` build failure:
# https://github.com/libgeos/geos/pull/805
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch";
hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM=";
})
];
nativeBuildInputs = [ cmake ];
doCheck = true;
@@ -40,8 +29,9 @@ stdenv.mkDerivation (finalAttrs: {
description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
homepage = "https://libgeos.org";
license = licenses.lgpl21Only;
mainProgram = "geosop";
maintainers = teams.geospatial.members;
pkgConfigModules = [ "geos" ];
mainProgram = "geosop";
changelog = "https://github.com/libgeos/geos/releases/tag/${finalAttrs.finalPackage.version}";
};
})
+2 -2
View File
@@ -3,7 +3,7 @@
, buildPythonPackage
, fetchPypi
, substituteAll
, geos39
, geos_3_9
, gdal
, asgiref
, pytz
@@ -33,7 +33,7 @@ buildPythonPackage rec {
] ++ lib.optional withGdal
(substituteAll {
src = ./django_3_set_geos_gdal_lib.patch;
inherit geos39;
inherit geos_3_9;
inherit gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary;
});
@@ -18,7 +18,7 @@ diff -Nur a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos
lib_path = settings.GEOS_LIBRARY_PATH
except (AttributeError, ImportError, ImproperlyConfigured, OSError):
- lib_path = None
+ lib_path = "@geos39@/lib/libgeos_c@extension@"
+ lib_path = "@geos_3_9@/lib/libgeos_c@extension@"
# Setting the appropriate names for the GEOS-C library.
if lib_path:
@@ -2,7 +2,7 @@
, buildPythonPackage
, fetchPypi
, python
, geos
, geos_3_11
, pytestCheckHook
, cython
, numpy
@@ -19,7 +19,7 @@ buildPythonPackage rec {
};
nativeBuildInputs = [
geos # for geos-config
geos_3_11 # for geos-config
cython
];
@@ -2,39 +2,32 @@
, stdenv
, buildPythonPackage
, fetchPypi
, substituteAll
, pythonOlder
, geos
, pytestCheckHook
, pythonOlder
, substituteAll
, cython
, geos_3_11
, numpy
, oldest-supported-numpy
, setuptools
, wheel
}:
buildPythonPackage rec {
pname = "Shapely";
version = "1.8.4";
disabled = pythonOlder "3.6";
version = "1.8.5";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-oZXlHKr6IYKR8suqP+9p/TNTyT7EtlsqRyLEz0DDGYw=";
hash = "sha256-6CttYOz7EkEgyI/hBqR4WWu+qxQhFtfn9ko2TayQKpI=";
};
nativeBuildInputs = [
geos # for geos-config
cython
];
propagatedBuildInputs = [
numpy
];
checkInputs = [
pytestCheckHook
];
# Environment variable used in shapely/_buildcfg.py
GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
GEOS_LIBRARY_PATH = "${geos_3_11}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
patches = [
# Patch to search form GOES .so/.dylib files in a Nix-aware way
@@ -45,6 +38,30 @@ buildPythonPackage rec {
})
];
postPatch = ''
substituteInPlace pyproject.toml --replace "setuptools<64" "setuptools"
'';
nativeBuildInputs = [
cython
geos_3_11 # for geos-config
oldest-supported-numpy
setuptools
wheel
];
buildInputs = [
geos_3_11
];
propagatedBuildInputs = [
numpy
];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
rm -r shapely # prevent import of local shapely
'';
@@ -63,9 +80,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "shapely" ];
meta = with lib; {
description = "Geometric objects, predicates, and operations";
homepage = "https://pypi.python.org/pypi/Shapely/";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ knedlsepp ];
changelog = "https://github.com/shapely/shapely/blob/${version}/CHANGES.txt";
description = "Manipulation and analysis of geometric objects";
homepage = "https://github.com/shapely/shapely";
license = licenses.bsd3;
maintainers = teams.geospatial.members;
};
}
+3 -1
View File
@@ -21459,7 +21459,9 @@ with pkgs;
stdenv = if stdenv.cc.isClang then overrideLibcxx llvmPackages_14.stdenv else stdenv;
};
geos39 = callPackage ../development/libraries/geos/3.9.nix { };
geos_3_9 = callPackage ../development/libraries/geos/3.9.nix { };
geos_3_11 = callPackage ../development/libraries/geos/3.11.nix { };
getdata = callPackage ../development/libraries/getdata { };
+2
View File
@@ -13022,6 +13022,8 @@ self: super: with self; {
shapely = callPackage ../development/python-modules/shapely { };
shapely_1_8 = callPackage ../development/python-modules/shapely/1.8.nix { };
shaperglot = callPackage ../development/python-modules/shaperglot { };
sharedmem = callPackage ../development/python-modules/sharedmem { };