Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2019-07-16 11:15:46 +02:00
92 changed files with 945 additions and 399 deletions

View File

@@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "acme-tiny";
version = "4.0.4";
version = "4.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "0vqlmvk34jgvgx3qdsh50q7m4aiy02786jyjjcq45dcws7a4f9f1";
sha256 = "0jmg525n4n98hwy3hf303jbnq23z79sqwgliji9j7qcnph47gkgq";
};
patchPhase = ''

View File

@@ -1,9 +1,10 @@
{ buildPythonPackage, lib, fetchPypi
, pytest, filelock, mock, pep8
, cython, isPy27
, six, pyshp, shapely, geos, proj, numpy
, six, pyshp, shapely, geos, numpy
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
, xvfb_run
, proj_5 # see https://github.com/SciTools/cartopy/pull/1252 for status on proj 6 support
}:
buildPythonPackage rec {
@@ -27,17 +28,17 @@ buildPythonPackage rec {
export HOME=$(mktemp -d)
${maybeXvfbRun} pytest --pyargs cartopy \
-m "not network and not natural_earth" \
-k "not test_nightshade_image"
-k "not test_nightshade_image and not background_img"
'';
nativeBuildInputs = [
cython
geos # for geos-config
proj
proj_5
];
buildInputs = [
geos proj
geos proj_5
];
propagatedBuildInputs = [

View File

@@ -1,7 +1,7 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, pythonOlder
, attrs, click, cligj, click-plugins, six, munch, enum34
, pytest, boto3, mock
, gdal
, gdal_2 # can't bump to 3 yet, https://github.com/Toblerity/Fiona/issues/745
}:
buildPythonPackage rec {
@@ -16,11 +16,11 @@ buildPythonPackage rec {
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11";
nativeBuildInputs = [
gdal # for gdal-config
gdal_2 # for gdal-config
];
buildInputs = [
gdal
gdal_2
];
propagatedBuildInputs = [

View File

@@ -0,0 +1,47 @@
diff a/pyproj/datadir.py b/pyproj/datadir.py
--- a/pyproj/datadir.py
+++ b/pyproj/datadir.py
@@ -52,6 +52,7 @@ def get_data_dir():
str: The valid data directory.
"""
+ return "@proj@/share/proj"
# to avoid re-validating
global _VALIDATED_PROJ_DATA
if _VALIDATED_PROJ_DATA is not None:
diff a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ INTERNAL_PROJ_DIR = os.path.join(CURRENT_FILE_PATH, "pyproj", BASE_INTERNAL_PROJ
def check_proj_version(proj_dir):
"""checks that the PROJ library meets the minimum version"""
- proj = os.path.join(proj_dir, "bin", "proj")
+ proj = "@proj@/bin/proj"
proj_ver_bytes = subprocess.check_output(proj, stderr=subprocess.STDOUT)
proj_ver_bytes = (proj_ver_bytes.decode("ascii").split()[1]).strip(",")
proj_version = parse_version(proj_ver_bytes)
@@ -33,6 +33,7 @@ def get_proj_dir():
"""
This function finds the base PROJ directory.
"""
+ return "@proj@"
proj_dir = os.environ.get("PROJ_DIR")
if proj_dir is None and os.path.exists(INTERNAL_PROJ_DIR):
proj_dir = INTERNAL_PROJ_DIR
@@ -56,6 +57,7 @@ def get_proj_libdirs(proj_dir):
"""
This function finds the library directories
"""
+ return ["@proj@/lib"]
proj_libdir = os.environ.get("PROJ_LIBDIR")
libdirs = []
if proj_libdir is None:
@@ -77,6 +79,7 @@ def get_proj_incdirs(proj_dir):
"""
This function finds the include directories
"""
+ return ["@proj@/include"]
proj_incdir = os.environ.get("PROJ_INCDIR")
incdirs = []
if proj_incdir is None:

View File

@@ -1,38 +1,49 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, nose2
{ lib, buildPythonPackage, fetchPypi, python, pkgs, pythonOlder, substituteAll
, aenum
, cython
, proj ? null
, pytest
, mock
, numpy
}:
buildPythonPackage (rec {
buildPythonPackage rec {
pname = "pyproj";
version = "unstable-2018-11-13";
version = "2.2.1";
src = fetchFromGitHub {
owner = "jswhit";
repo = pname;
rev = "78540f5ff40da92160f80860416c91ee74b7643c";
sha256 = "1vq5smxmpdjxialxxglsfh48wx8kaq9sc5mqqxn4fgv1r5n1m3n9";
src = fetchPypi {
inherit pname version;
sha256 = "0yigcxwmx5cczipf2mpmy2gq1dnl0635yjvjq86ay47j1j5fd2gc";
};
buildInputs = [ cython ];
# force pyproj to use ${pkgs.proj}
patches = [
(substituteAll {
src = ./001.proj.patch;
proj = pkgs.proj;
})
];
checkInputs = [ nose2 ];
buildInputs = [ cython pkgs.proj ];
propagatedBuildInputs = [
numpy
] ++ lib.optional (pythonOlder "3.6") aenum;
checkInputs = [ pytest mock ];
# ignore rounding errors, and impure docgen
# datadir is ignored because it does the proj look up logic, which isn't relevant
checkPhase = ''
runHook preCheck
pushd unittest # changing directory should ensure we're importing the global pyproj
${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])"
popd
runHook postCheck
pytest . -k 'not alternative_grid_name \
and not transform_wgs84_to_alaska \
and not repr' \
--ignore=test/test_doctest_wrapper.py \
--ignore=test/test_datadir.py
'';
meta = {
description = "Python interface to PROJ.4 library";
homepage = https://github.com/jswhit/pyproj;
homepage = "https://github.com/jswhit/pyproj";
license = with lib.licenses; [ isc ];
};
} // (if proj == null then {} else { PROJ_DIR = proj; }))
}

View File

@@ -1,17 +1,25 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, deap, scikitlearn, python, isPy3k }:
{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikitlearn, python }:
buildPythonPackage rec {
pname = "sklearn-deap";
version = "0.2.2";
version = "0.2.3";
# No tests in Pypi
src = fetchFromGitHub {
owner = "rsteca";
repo = pname;
rev = "${version}";
sha256 = "01ynmzxg181xhv2d7bs53zjvk9x2qpxix32sspq54mpigxh13ava";
sha256 = "1yqnmy8h08i2y6bb2s0a5nx9cwvyg45293whqh420c195gpzg1x3";
};
patches = [
# Fix for newer versions of scikit-learn. See: https://github.com/rsteca/sklearn-deap/pull/62
(fetchpatch {
url = "https://github.com/rsteca/sklearn-deap/commit/3ae62990fc87f36b59382e7c4db3c74cf99ec3bf.patch";
sha256 = "1na6wf4v0dcmyz3pz8aiqkmv76d1iz3hi4iyfq9kfnycgzpv1kxk";
})
];
propagatedBuildInputs = [ numpy scipy deap scikitlearn ];
checkPhase = ''
@@ -23,7 +31,6 @@ buildPythonPackage rec {
homepage = https://github.com/rsteca/sklearn-deap;
license = licenses.lgpl3;
maintainers = with maintainers; [ psyanticy ];
broken = isPy3k; # https://github.com/rsteca/sklearn-deap/issues/65
};
}

View File

@@ -0,0 +1,30 @@
{ buildPythonPackage
, lib
, python
, fetchPypi
, msrest
}:
buildPythonPackage rec {
version = "0.1.25";
pname = "vsts";
src = fetchPypi {
inherit pname version;
sha256 = "15sgwqa72ynpahj101r2kc15s3dnsafg5gqx0sz3hnqz29h925ys";
};
propagatedBuildInputs = [ msrest ];
# Tests are highly impure
checkPhase = ''
${python.interpreter} -c 'import vsts.version; print(vsts.version.VERSION)'
'';
meta = with lib; {
description = "Python APIs for interacting with and managing Azure DevOps";
homepage = https://github.com/microsoft/azure-devops-python-api;
license = licenses.mit;
maintainers = with maintainers; [ jonringer ];
};
}