Merge branch 'staging-next' into staging

This commit is contained in:
Vladimír Čunát
2019-09-24 08:15:01 +02:00
150 changed files with 3068 additions and 2317 deletions

View File

@@ -19,8 +19,8 @@
}@args:
import ./generic.nix ({
version = "1.0.2";
sha256 = "01ac51ae12c4324ca5809ce270f9dd1b67f5166fe63bd3e497e9ea3ca91946ff";
version = "1.1.0";
sha256 = "1nq53f5jipgy9jgyfxp43j40qfbmrhgn1cj8bp5rrb3liy3wbh7i";
dlopen_patch = ./dlopen-paths.patch;
disabled = pythonOlder "3.5";
inherit withXcffib;

View File

@@ -1,46 +1,61 @@
commit 0435bc2577d4b18f54b78b2f5185abb2b2005982
Author: Alexander V. Nikolaev <avn@avnik.info>
Date: Sat Feb 6 08:09:06 2016 +0200
Patch dlopen() to allow direct paths to all required libs
Patch dlopen() to allow direct paths to all required libs
This is an update of the patch submitted in
https://github.com/NixOS/nixpkgs/commit/b13e44e094989d3a902f8c73b22e8d3c0cc7acf4
by Alexander V. Nikolaev <avn@avnik.info>
This patch is NixOS specific
---
cairocffi/__init__.py | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py
index 6061973..3538a58 100644
index 307d58c..43c29e3 100644
--- a/cairocffi/__init__.py
+++ b/cairocffi/__init__.py
@@ -21,19 +21,22 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip()
version = '1.16.0'
version_info = (1, 16, 0)
@@ -21,28 +21,26 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip()
version = '1.17.2'
version_info = (1, 17, 2)
+# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime
+# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be
+# required for runtime
+_LIBS = {
+ 'cairo': '@cairo@/lib/libcairo@ext@',
+ 'glib-2.0': '@glib@/lib/libglib-2.0@ext@',
+ 'gobject-2.0': '@glib@/lib/libgobject-2.0@ext@',
+ 'gdk_pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
+}
+
-def dlopen(ffi, *names):
+def dlopen(ffi, name, *names):
def dlopen(ffi, library_names, filenames):
"""Try various names for the same library, for different platforms."""
- for name in names:
- for lib_name in (name, 'lib' + name):
- try:
- path = ctypes.util.find_library(lib_name)
- lib = ffi.dlopen(path or lib_name)
- if lib:
- return lib
- except OSError:
- pass
- raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
+ path = _LIBS.get(name, None)
+ if path:
+ lib = ffi.dlopen(path)
+ if lib:
+ return lib
+ raise OSError("dlopen() failed to load a library: %s as %s" % (name, path))
- exceptions = []
-
for library_name in library_names:
- library_filename = find_library(library_name)
- if library_filename:
- filenames = (library_filename,) + filenames
- else:
- exceptions.append(
- 'no library called "{}" was found'.format(library_name))
-
- for filename in filenames:
- try:
- return ffi.dlopen(filename)
- except OSError as exception: # pragma: no cover
- exceptions.append(exception)
-
- error_message = '\n'.join( # pragma: no cover
- str(exception) for exception in exceptions)
- raise OSError(error_message) # pragma: no cover
+ path = _LIBS.get(library_name, None)
+ if path:
+ lib = ffi.dlopen(path)
+ if lib:
+ return lib
+
+ raise OSError("dlopen() failed to load a library: %s as %s" % (library_name, path))
cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2', 'cairo.so.2')
cairo = dlopen(
--
2.19.2

View File

@@ -9,11 +9,11 @@ in
buildPythonPackage rec {
pname = "dependency-injector";
version = "3.14.6";
version = "3.14.10";
src = fetchPypi {
inherit pname version;
sha256 = "2e1889a0981381f557b0d14cba900adf7476817c53c13bfb04e2a30b3db0f1d3";
sha256 = "1c475axh40f8s4n5dqm52qczx9g2g8b8wsy0qvghirk84ikpca5y";
};
propagatedBuildInputs = [ six ];

View File

@@ -26,6 +26,8 @@ buildPythonPackage rec {
substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" ""
'';
dontUseCmakeConfigure = true;
# Python 3 works but has a broken import test that I couldn't
# figure out.
doCheck = !isPy3k;

View File

@@ -1,27 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi
, setuptools_scm, entrypoints, secretstorage
, dbus-python, setuptools_scm, entrypoints, secretstorage
, pytest, pytest-flake8 }:
buildPythonPackage rec {
pname = "keyring";
version = "18.0.1";
version = "19.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "67d6cc0132bd77922725fae9f18366bb314fd8f95ff4d323a4df41890a96a838";
sha256 = "13frfmws03jdyz9wxb4ylkvk80qiyb6a3h3sn7wx3ry97bn5li3a";
};
nativeBuildInputs = [ setuptools_scm ];
checkInputs = [ pytest pytest-flake8 ];
propagatedBuildInputs = [ entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
propagatedBuildInputs = [ dbus-python entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage;
doCheck = !stdenv.isDarwin;
checkPhase = ''
py.test
'';
# checks try to access a darwin path on linux
doCheck = false;
meta = with stdenv.lib; {
description = "Store and access your passwords safely";

View File

@@ -12,6 +12,7 @@ buildPythonPackage rec {
rev = "v${version}";
sha256 = "0q8sha38w7ajg7ar0rmbqrwv0n58l8yzyl96cqwcbvp578fn3ir0";
};
postPatch = "patchShebangs ./configure";
propagatedBuildInputs = [ boolean-py ];

View File

@@ -0,0 +1,29 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pytest
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytest-check";
version = "0.3.5";
src = fetchFromGitHub {
owner = "okken";
repo = "pytest-check";
rev = version;
sha256 = "11wb4f4sp4cr5mzqdakrbycwgfr2p1sx1l91fa6525wnfvgc0qy3";
};
buildInputs = [ pytest ];
checkInputs = [ pytest pytestCheckHook ];
meta = with stdenv.lib; {
description = "pytest plugin allowing multiple failures per test";
homepage = https://github.com/okken/pytest-check;
license = licenses.mit;
maintainers = [ maintainers.flokli ];
};
}