Unverified Commit 184138de authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #213152 from fabaff/folium-fix

python310Packages.folium: remove patch 
parents 9fdd065d 01358a7c
Loading
Loading
Loading
Loading
+48 −13
Original line number Diff line number Diff line
{ 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;

  postPatch = ''
    # We don't want flake8
    rm setup.cfg
  '';

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    jinja2
  ];

  nativeCheckInputs = [
    pytestCheckHook
    selenium
  ];

  pythonImportsCheck = [
    "branca"
  ];

  disabledTestPaths = [
    # Some tests require a browser
    "tests/test_utilities.py"
  ];

  # Seems to require a browser
  doCheck = false;
  disabledTests = [
    "test_rendering_utf8_iframe"
    "test_rendering_figure_notebook"
  ];

  meta = {
  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; [ ];
  };
}
+21 −17
Original line number Diff line number Diff line
{ 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 ];
  };
+46 −10
Original line number Diff line number Diff line
{ 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=";
    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 ];
  };
+33 −28
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder

# build time
, cython
, gdal

# runtime
, affine
, attrs
, boto3
, buildPythonPackage
, click
, click-plugins
, cligj
, certifi
, cython
, fetchFromGitHub
, gdal
, hypothesis
, matplotlib
, ipython
, numpy
, snuggs
, setuptools

# tests
, hypothesis
, 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 ];
  };