python39Packages.folium: fix version number, run tests, cleanups

Fetching from GitHub is required to have the tests.
This commit is contained in:
Sandro Jäckel 2022-02-07 03:16:44 +01:00 committed by Jonathan Ringer
parent 126ff454d4
commit 9bc1ce476c

View file

@ -1,37 +1,60 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, pythonOlder
, pytest
, numpy
, nbconvert
, pandas
, mock
, jinja2
, pytestCheckHook
, branca
, jinja2
, nbconvert
, numpy
, pandas
, pillow
, requests
, selenium
, setuptools-scm
}:
buildPythonPackage rec {
pname = "folium";
version = "0.12.1.post1";
src = fetchPypi {
inherit pname version;
sha256 = "e91e57d8298f3ccf4cce3c5e065bea6eb17033e3c5432b8a22214009c266b2ab";
};
disabled = pythonOlder "3.5";
checkInputs = [ pytest nbconvert pandas mock ];
propagatedBuildInputs = [ jinja2 branca requests numpy ];
src = fetchFromGitHub {
owner = "python-visualization";
repo = "folium";
rev = "v${version}";
sha256 = "sha256-4UseN/3ojZdDUopwZLpHZEBon1qDDvCWfdzxodi/BeA=";
};
# No tests in archive
doCheck = false;
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
checkPhase = ''
py.test
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
branca
jinja2
numpy
requests
];
checkInputs = [
nbconvert
pytestCheckHook
pandas
pillow
selenium
];
disabledTests = [
# requires internet connection
"test_geojson"
"test_heat_map_with_weights"
"test_json_request"
"test_notebook"
];
meta = {
description = "Make beautiful maps with Leaflet.js & Python";