Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2018-07-19 18:24:24 +02:00
294 changed files with 61697 additions and 32101 deletions

View File

@@ -1,4 +1,4 @@
{ lib, fetchurl, buildPythonPackage, python, pkgconfig, dbus, dbus-glib, dbus_tools, isPyPy
{ lib, fetchurl, buildPythonPackage, python, pkgconfig, dbus, dbus-glib, isPyPy
, ncurses, pygobject3 }:
if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else buildPythonPackage rec {
@@ -15,7 +15,7 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus dbus-glib ]
++ lib.optionals doCheck [ dbus_tools pygobject3 ]
++ lib.optionals doCheck [ dbus.out pygobject3 ]
# My guess why it's sometimes trying to -lncurses.
# It seems not to retain the dependency anyway.
++ lib.optional (! python ? modules) ncurses;

View File

@@ -0,0 +1,45 @@
{ buildPythonPackage, fetchFromGitHub, lib, flask, flask-caching, cairocffi, pyparsing, pytz, pyyaml
, raven, six, structlog, tzlocal, nose, mock, cairo, isPyPy
}:
buildPythonPackage rec {
pname = "graphite-api";
version = "1.1.3";
disabled = isPyPy;
src = fetchFromGitHub {
owner = "brutasse";
repo = "graphite-api";
rev = version;
sha256 = "0sz3kav2024ms2z4q03pigcf080gsr5v774z9bp3zw29k2p47ass";
};
# https://github.com/brutasse/graphite-api/pull/239 rebased onto 1.1.3
patches = [ ./flask-caching-rebased.patch ];
checkPhase = "nosetests";
propagatedBuildInputs = [
flask
flask-caching
cairocffi
pyparsing
pytz
pyyaml
raven
six
structlog
tzlocal
];
checkInputs = [ nose mock ];
LD_LIBRARY_PATH = "${cairo.out}/lib";
meta = with lib; {
description = "Graphite-web, without the interface. Just the rendering HTTP API";
homepage = https://github.com/brutasse/graphite-api;
license = licenses.asl20;
};
}

View File

@@ -0,0 +1,132 @@
diff --git a/graphite_api/config.py b/graphite_api/config.py
index 5e1e382..dc033a8 100644
--- a/graphite_api/config.py
+++ b/graphite_api/config.py
@@ -112,11 +112,11 @@ def configure(app):
app.cache = None
if 'cache' in config:
try:
- from flask.ext.cache import Cache
+ from flask_caching import Cache
except ImportError:
warnings.warn("'cache' is provided in the configuration but "
- "Flask-Cache is not installed. Please `pip install "
- "Flask-Cache`.")
+ "flask-caching is not installed. Please `pip "
+ "install flask-caching`.")
else:
cache_conf = {'CACHE_DEFAULT_TIMEOUT': 60,
'CACHE_KEY_PREFIX': 'graphite-api:'}
diff --git a/requirements.txt b/requirements.txt
index c68b446..7826b0c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
Flask
-Flask-Cache
+Flask-Caching
cairocffi
pyparsing>=1.5.7
pytz
diff --git a/setup.py b/setup.py
index 0337cbe..df07989 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ setup(
extras_require={
'sentry': ['raven[flask]'],
'cyanite': ['cyanite'],
- 'cache': ['Flask-Cache'],
+ 'cache': ['Flask-Caching'],
'statsd': ['statsd'],
},
zip_safe=False,
diff --git a/tests/test_render.py b/tests/test_render.py
index be5609d..a0e7190 100644
--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -8,7 +8,7 @@ from graphite_api._vendor import whisper
from . import TestCase, WHISPER_DIR
try:
- from flask.ext.cache import Cache
+ from flask_caching import Cache
except ImportError:
Cache = None
diff --git a/tox.ini b/tox.ini
index 85a0abb..c820393 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,7 +47,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -56,7 +56,7 @@ basepython = python3.3
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:py34]
@@ -66,7 +66,7 @@ commands =
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:py35]
@@ -76,7 +76,7 @@ commands =
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:pyparsing1]
@@ -84,7 +84,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing==1.5.7
mock
@@ -93,7 +93,7 @@ basepython = pypy
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -102,7 +102,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask<0.9
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -111,7 +111,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask<0.10
- Flask-Cache
+ Flask-Caching
pyparsing
mock

View File

@@ -1,11 +1,11 @@
{ stdenv, buildPythonPackage, fetchPypi, libmysql }:
{ stdenv, buildPythonPackage, fetchPypi, mysql }:
buildPythonPackage rec {
pname = "mysqlclient";
version = "1.3.12";
buildInputs = [
libmysql
mysql.connector-c
];
# Tests need a MySQL database

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus_libs, makeWrapper }:
{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus, makeWrapper }:
let
pname = "PyQt-x11-gpl";
@@ -42,7 +42,7 @@ in buildPythonPackage {
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ makeWrapper qt4 lndir dbus_libs ];
buildInputs = [ makeWrapper qt4 lndir dbus ];
propagatedBuildInputs = [ sip ];

View File

@@ -1,5 +1,5 @@
{ lib, fetchurl, fetchpatch, pythonPackages, pkgconfig, makeWrapper
, qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus_libs
, qmake, lndir, qtbase, qtsvg, qtwebkit, qtwebengine, dbus
, withWebSockets ? false, qtwebsockets
, withConnectivity ? false, qtconnectivity
}:
@@ -32,7 +32,7 @@ in buildPythonPackage {
nativeBuildInputs = [ pkgconfig qmake lndir ];
buildInputs = [ dbus_libs ];
buildInputs = [ dbus ];
propagatedBuildInputs = [
sip qtbase qtsvg qtwebkit qtwebengine
@@ -53,7 +53,7 @@ in buildPythonPackage {
${python.executable} configure.py -w \
--confirm-license \
--dbus=${dbus_libs.dev}/include/dbus-1.0 \
--dbus=${dbus.dev}/include/dbus-1.0 \
--no-qml-plugin \
--bindir=$out/bin \
--destdir=$out/${python.sitePackages} \

View File

@@ -0,0 +1,18 @@
{ buildPythonPackage, fetchPypi, lib }:
buildPythonPackage rec {
pname = "simpy";
version = "3.0.11";
src = fetchPypi {
inherit pname version;
sha256 = "0hqgxk3lggf21jq9lh8838cdl24mdkdnpzh0w4m28d0zn2wjb5nh";
};
meta = with lib; {
homepage = https://simpy.readthedocs.io/en/latest/;
description = "A process-based discrete-event simulation framework based on standard Python.";
license = [ licenses.mit ];
maintainers = with maintainers; [ shlevy ];
};
}

View File

@@ -1,11 +1,13 @@
{ lib, fetchPypi, buildPythonPackage,
protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp
protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp, isPy3k
}:
buildPythonPackage rec {
pname = "trezor";
version = "0.9.1";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "a481191011bade98f1e9f1201e7c72a83945050657bbc90dc4ac32dc8b8b46a4";