mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 05:00:19 +00:00
python39Packages.folium: fix version number, run tests, cleanups
Fetching from GitHub is required to have the tests.
This commit is contained in:
parent
126ff454d4
commit
9bc1ce476c
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user