-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314101 from sikmir/mapclassify
python3Packages.mapclassify: init at 2.6.1
- Loading branch information
Showing
5 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pytestCheckHook, | ||
pythonOlder, | ||
|
||
geopandas, | ||
pooch, | ||
pyogrio, | ||
setuptools-scm, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "geodatasets"; | ||
version = "2023.12.0"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "geopandas"; | ||
repo = "geodatasets"; | ||
rev = version; | ||
hash = "sha256-yecAky3lCKcSgW4kkYTBNnyKyIWnGSBL600wVgGN8CE="; | ||
}; | ||
|
||
build-system = [ setuptools-scm ]; | ||
|
||
propagatedBuildInputs = [ pooch ]; | ||
|
||
nativeCheckInputs = [ | ||
geopandas | ||
pyogrio | ||
pytestCheckHook | ||
]; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
pytestFlagsArray = [ | ||
# disable tests which require network access | ||
"-m 'not request'" | ||
]; | ||
|
||
pythonImportsCheck = [ "geodatasets" ]; | ||
|
||
meta = { | ||
description = "Spatial data examples"; | ||
homepage = "https://geodatasets.readthedocs.io/"; | ||
license = lib.licenses.bsd3; | ||
maintainers = lib.teams.geospatial.members; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pytestCheckHook, | ||
pythonOlder, | ||
|
||
beautifulsoup4, | ||
fiona, | ||
geodatasets, | ||
geopandas, | ||
numpy, | ||
packaging, | ||
pandas, | ||
platformdirs, | ||
requests, | ||
scikit-learn, | ||
scipy, | ||
setuptools-scm, | ||
shapely, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "libpysal"; | ||
version = "4.10"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.10"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "pysal"; | ||
repo = "libpysal"; | ||
rev = "v${version}"; | ||
hash = "sha256-jzSkIFSIXc039KR4fS1HOI/Rj0mHwbArn2hD+zfAZDg="; | ||
}; | ||
|
||
build-system = [ setuptools-scm ]; | ||
|
||
propagatedBuildInputs = [ | ||
beautifulsoup4 | ||
fiona | ||
geopandas | ||
numpy | ||
packaging | ||
pandas | ||
platformdirs | ||
requests | ||
scikit-learn | ||
scipy | ||
shapely | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
geodatasets | ||
pytestCheckHook | ||
]; | ||
|
||
preCheck = '' | ||
export HOME=$TMPDIR | ||
''; | ||
|
||
# requires network access | ||
disabledTestPaths = [ | ||
"libpysal/cg/tests/test_geoJSON.py" | ||
"libpysal/examples/tests/test_available.py" | ||
"libpysal/graph/tests/test_base.py" | ||
"libpysal/graph/tests/test_builders.py" | ||
"libpysal/graph/tests/test_contiguity.py" | ||
"libpysal/graph/tests/test_kernel.py" | ||
"libpysal/graph/tests/test_matching.py" | ||
"libpysal/graph/tests/test_plotting.py" | ||
"libpysal/graph/tests/test_triangulation.py" | ||
"libpysal/graph/tests/test_utils.py" | ||
"libpysal/graph/tests/test_set_ops.py" | ||
"libpysal/weights/tests/test_contiguity.py" | ||
"libpysal/weights/tests/test_util.py" | ||
]; | ||
|
||
pythonImportsCheck = [ "libpysal" ]; | ||
|
||
meta = { | ||
description = "A library of spatial analysis functions"; | ||
homepage = "https://pysal.org/libpysal/"; | ||
license = lib.licenses.bsd3; | ||
maintainers = lib.teams.geospatial.members; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pytestCheckHook, | ||
pythonOlder, | ||
|
||
geopandas, | ||
libpysal, | ||
networkx, | ||
numpy, | ||
pandas, | ||
scikit-learn, | ||
scipy, | ||
setuptools-scm, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "mapclassify"; | ||
version = "2.6.1"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.9"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "pysal"; | ||
repo = "mapclassify"; | ||
rev = "v${version}"; | ||
hash = "sha256-lb2Ui6zdx6MQBtBrL/Xj9k7cm6De8aLEuBLZDhPPDnE="; | ||
}; | ||
|
||
build-system = [ setuptools-scm ]; | ||
|
||
propagatedBuildInputs = [ | ||
networkx | ||
numpy | ||
pandas | ||
scikit-learn | ||
scipy | ||
]; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
geopandas | ||
libpysal | ||
]; | ||
|
||
# requires network access | ||
disabledTestPaths = [ "mapclassify/tests/test_greedy.py" ]; | ||
|
||
pythonImportsCheck = [ "mapclassify" ]; | ||
|
||
meta = { | ||
description = "Classification Schemes for Choropleth Maps"; | ||
homepage = "https://pysal.org/mapclassify/"; | ||
license = lib.licenses.bsd3; | ||
maintainers = lib.teams.geospatial.members; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
pytestCheckHook, | ||
pythonOlder, | ||
|
||
certifi, | ||
cython, | ||
gdal, | ||
numpy, | ||
packaging, | ||
setuptools, | ||
versioneer, | ||
wheel, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "pyogrio"; | ||
version = "0.8.0"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "geopandas"; | ||
repo = "pyogrio"; | ||
rev = "v${version}"; | ||
hash = "sha256-h4Rv5xOWSJSv0nLbosviz5EiF/IsZO5wzBel9YRd0Bg="; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace-fail "versioneer[toml]==0.28" "versioneer[toml]" | ||
'' + lib.optionalString (!pythonOlder "3.12") '' | ||
substituteInPlace setup.py \ | ||
--replace-fail "distutils" "setuptools._distutils" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
cython | ||
gdal # for gdal-config | ||
setuptools | ||
versioneer | ||
wheel | ||
] ++ versioneer.optional-dependencies.toml; | ||
|
||
buildInputs = [ gdal ]; | ||
|
||
propagatedBuildInputs = [ | ||
certifi | ||
numpy | ||
packaging | ||
]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
|
||
preCheck = '' | ||
python setup.py build_ext --inplace | ||
''; | ||
|
||
pytestFlagsArray = [ | ||
# disable tests which require network access | ||
"-m 'not network'" | ||
]; | ||
|
||
pythonImportsCheck = [ "pyogrio" ]; | ||
|
||
meta = { | ||
description = "Vectorized spatial vector file format I/O using GDAL/OGR"; | ||
homepage = "https://pyogrio.readthedocs.io/"; | ||
changelog = "https://github.com/geopandas/pyogrio/blob/${src.rev}/CHANGES.md"; | ||
license = lib.licenses.mit; | ||
maintainers = lib.teams.geospatial.members; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters