Merge pull request #213152 from fabaff/folium-fix

python310Packages.folium: remove patch
This commit is contained in:
Fabian Affolter 2023-01-29 00:40:08 +01:00 committed by GitHub
commit 184138de6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 149 additions and 69 deletions

View File

@ -1,31 +1,66 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, fetchFromGitHub
, jinja2
, pytestCheckHook
, pythonOlder
, setuptools-scm
, selenium
, six
, setuptools
}:
buildPythonPackage rec {
pname = "branca";
version = "0.6.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-VZSYVSFFBMdYO3G5oDqE3OLpaoQCdhO7U7QtBIRM4k4=";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-visualization";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-bcqr+vGKBga4rR4XFRWbjtw5xL+pWkIt+ihtKlKF6Y8=";
};
nativeCheckInputs = [ pytest selenium ];
propagatedBuildInputs = [ jinja2 six setuptools ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
# Seems to require a browser
doCheck = false;
postPatch = ''
# We don't want flake8
rm setup.cfg
'';
meta = {
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
jinja2
];
nativeCheckInputs = [
pytestCheckHook
selenium
];
pythonImportsCheck = [
"branca"
];
disabledTestPaths = [
# Some tests require a browser
"tests/test_utilities.py"
];
disabledTests = [
"test_rendering_utf8_iframe"
"test_rendering_figure_notebook"
];
meta = with lib; {
description = "Generate complex HTML+JS pages with Python";
homepage = "https://github.com/python-visualization/branca";
license = with lib.licenses; [ mit ];
changelog = "https://github.com/python-visualization/branca/blob/v${version}/CHANGES.txt";
license = with licenses; [ mit ];
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -1,42 +1,36 @@
{ lib
, branca
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pythonOlder
, pytestCheckHook
, branca
, geopandas
, jinja2
, nbconvert
, numpy
, pandas
, pillow
, pytestCheckHook
, pythonOlder
, requests
, selenium
, setuptools-scm
, xyzservices
}:
buildPythonPackage rec {
pname = "folium";
version = "0.14.0";
format = "setuptools";
disabled = pythonOlder "3.5";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-visualization";
repo = "folium";
rev = "refs/tags/v${version}";
sha256 = "sha256-zxLFj5AeTVAxE0En7ZlbBdJEm3WrcPv23MgOhyfNi14=";
hash = "sha256-zxLFj5AeTVAxE0En7ZlbBdJEm3WrcPv23MgOhyfNi14=";
};
patches = [
# Fix test failures with latest branca
(fetchpatch {
url = "https://github.com/python-visualization/folium/commit/b410ab21cc46ec6756c2f755e5e81dcdca029c53.patch";
hash = "sha256-SVN4wKEep+VnAKnkJTf59rhnzHnbk6dV9XL5ntv4bog=";
})
];
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
@ -50,24 +44,34 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
geopandas
nbconvert
pytestCheckHook
pandas
pillow
pytestCheckHook
selenium
xyzservices
];
disabledTests = [
# requires internet connection
# Tests require internet connection
"test__repr_png_is_bytes"
"test_geojson"
"test_heat_map_with_weights"
"test_json_request"
"test_notebook"
"test_valid_png_size"
"test_valid_png"
];
pythonImportsCheck = [
"folium"
];
meta = {
description = "Make beautiful maps with Leaflet.js & Python";
homepage = "https://github.com/python-visualization/folium";
changelog = "https://github.com/python-visualization/folium/blob/v${version}/CHANGES.txt";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fridh ];
};

View File

@ -1,27 +1,63 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, geopandas, matplotlib, networkx, numpy
, pandas, requests, Rtree, shapely, folium, scikit-learn, scipy, gdal, rasterio}:
{ lib
, buildPythonPackage
, fetchFromGitHub
, folium
, gdal
, geopandas
, matplotlib
, networkx
, numpy
, pandas
, pythonOlder
, rasterio
, requests
, Rtree
, scikit-learn
, scipy
, shapely
}:
buildPythonPackage rec {
pname = "osmnx";
version = "1.2.2";
version = "1.3.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "gboeing";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+dUv1QrUmCIOCyUyjYX1kJtZrPuSp3t9xz/sRV7ppgA=";
owner = "gboeing";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-17duWrg48Qb4ojYYFX4HBpPLeVgHn1WV84KVATvBnzY=";
};
propagatedBuildInputs = [ geopandas matplotlib networkx numpy pandas requests Rtree shapely folium scikit-learn scipy gdal rasterio ];
propagatedBuildInputs = [
geopandas
matplotlib
networkx
numpy
pandas
requests
Rtree
shapely
folium
scikit-learn
scipy
gdal
rasterio
];
# requires network
# Tests require network
doCheck = false;
pythonImportsCheck = [ "osmnx" ];
pythonImportsCheck = [
"osmnx"
];
meta = with lib; {
description = "A package to easily download, construct, project, visualize, and analyze complex street networks from OpenStreetMap with NetworkX.";
homepage = "https://github.com/gboeing/osmnx";
changelog = "https://github.com/gboeing/osmnx/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};

View File

@ -1,45 +1,41 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# build time
, cython
, gdal
# runtime
, affine
, attrs
, boto3
, buildPythonPackage
, click
, click-plugins
, cligj
, matplotlib
, numpy
, snuggs
, setuptools
# tests
, certifi
, cython
, fetchFromGitHub
, gdal
, hypothesis
, matplotlib
, ipython
, numpy
, packaging
, pytest-randomly
, pytestCheckHook
, pythonOlder
, setuptools
, shapely
, snuggs
}:
buildPythonPackage rec {
pname = "rasterio";
version = "4"; # not x.y[ab]z, those are alpha/beta versions
version = "1.3.5";
format = "pyproject";
disabled = pythonOlder "3.6";
# Pypi doesn't ship the tests, so we fetch directly from GitHub
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "rasterio";
repo = "rasterio";
rev = "refs/tags/release-test-${version}";
hash = "sha256-YO0FnmIEt+88f6k2mdXDSQg7UKq1Swr8wqVUGdRyQR4=";
rev = "refs/tags/${version}";
hash = "sha256-VZE58xbTTAicGqkl8ktYBhN+5tFj8FoUYxg8fi05bmo=";
};
nativeBuildInputs = [
@ -50,25 +46,32 @@ buildPythonPackage rec {
propagatedBuildInputs = [
affine
attrs
boto3
click
click-plugins
cligj
matplotlib
certifi
numpy
snuggs
setuptools # needs pkg_resources at runtime
setuptools
];
preCheck = ''
rm -rf rasterio
'';
passthru.optional-dependencies = {
ipython = [
ipython
];
plot = [
matplotlib
];
s3 = [
boto3
];
};
nativeCheckInputs = [
hypothesis
packaging
pytest-randomly
pytestCheckHook
packaging
hypothesis
shapely
];
@ -85,13 +88,15 @@ buildPythonPackage rec {
];
doInstallCheck = true;
installCheckPhase = ''
$out/bin/rio --version | grep ${version} > /dev/null
'';
meta = with lib; {
description = "Python package to read and write geospatial raster data";
homepage = "https://rasterio.readthedocs.io/en/latest/";
homepage = "https://rasterio.readthedocs.io/";
changelog = "https://github.com/rasterio/rasterio/blob/${version}/CHANGES.txt";
license = licenses.bsd3;
maintainers = with maintainers; [ mredaelli ];
};