Merge branch 'staging-next' into staging
This commit is contained in:
28
pkgs/development/python-modules/acebinf/default.nix
Normal file
28
pkgs/development/python-modules/acebinf/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pyvcf
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ACEBinf";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1168pny671l6zfm2vv1pwspnflmzi7f4v8yldjl7zlz0b9cm5zlz";
|
||||
};
|
||||
|
||||
buildInputs = [ pyvcf ];
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "acebinf" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/ACEnglish/acebinf";
|
||||
description = "Collection of simple utilities used when building bioinformatics tools";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ ris ];
|
||||
};
|
||||
}
|
||||
42
pkgs/development/python-modules/bwapy/default.nix
Normal file
42
pkgs/development/python-modules/bwapy/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, bwa
|
||||
, cffi
|
||||
, zlib
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "bwapy";
|
||||
version = "0.1.4";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw";
|
||||
};
|
||||
postPatch = ''
|
||||
# replace bundled bwa
|
||||
rm -r bwa/*
|
||||
cp ${bwa}/lib/*.a ${bwa}/include/*.h bwa/
|
||||
|
||||
substituteInPlace setup.py \
|
||||
--replace 'setuptools>=49.2.0' 'setuptools'
|
||||
'';
|
||||
|
||||
buildInputs = [ zlib bwa ];
|
||||
|
||||
propagatedBuildInputs = [ cffi ];
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "bwapy" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/ACEnglish/acebinf";
|
||||
description = "Python bindings to bwa mem aligner";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ ris ];
|
||||
};
|
||||
}
|
||||
53
pkgs/development/python-modules/clldutils/default.nix
Normal file
53
pkgs/development/python-modules/clldutils/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy27
|
||||
, attrs
|
||||
, colorlog
|
||||
, csvw
|
||||
, dateutil
|
||||
, tabulate
|
||||
, mock
|
||||
, postgresql
|
||||
, pytestCheckHook
|
||||
, pytest-mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "clldutils";
|
||||
version = "3.5.2";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "clld";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0qlqp9yq4lbi9ik2psgw0svxlb7raadqaxdh2dgkn85d7h20y4nd";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.cfg --replace "--cov" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dateutil
|
||||
tabulate
|
||||
colorlog
|
||||
attrs
|
||||
csvw
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mock
|
||||
postgresql
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CSV on the Web";
|
||||
homepage = "https://github.com/cldf/csvw";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
buildPythonPackage {
|
||||
pname = "cozy";
|
||||
version = "2.0a1";
|
||||
disabled = !isPy3k;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
z3 ply python-igraph oset ordered-set dictionaries
|
||||
@@ -18,18 +19,18 @@ buildPythonPackage {
|
||||
|
||||
# Yoink the Z3 dependency name, because our Z3 package doesn't provide it.
|
||||
postPatch = ''
|
||||
sed -i -e '/z3-solver/d' requirements.txt
|
||||
sed -i -e '/z3-solver/d' -e 's/^dictionaries.*$/dictionaries/' requirements.txt
|
||||
'';
|
||||
|
||||
# Tests are not correctly set up in the source tree.
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "cozy" ];
|
||||
|
||||
# There is some first-time-run codegen that we will force to happen.
|
||||
postInstall = ''
|
||||
$out/bin/cozy --help
|
||||
'';
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
meta = {
|
||||
description = "The collection synthesizer";
|
||||
|
||||
51
pkgs/development/python-modules/csvw/default.nix
Normal file
51
pkgs/development/python-modules/csvw/default.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy27
|
||||
, attrs
|
||||
, isodate
|
||||
, dateutil
|
||||
, rfc3986
|
||||
, uritemplate
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
, pytest-mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "csvw";
|
||||
version = "1.8.0";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cldf";
|
||||
repo = "csvw";
|
||||
rev = "v${version}";
|
||||
sha256 = "0maxrsiv9i9hkg627hwqyq8g6jg3g8iv8gdqaxz4aysjd9xddydd";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.cfg --replace "--cov" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
attrs
|
||||
isodate
|
||||
dateutil
|
||||
rfc3986
|
||||
uritemplate
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mock
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CSV on the Web";
|
||||
homepage = "https://github.com/cldf/csvw";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
, singledispatch
|
||||
, mpi4py
|
||||
, bokeh
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -35,11 +36,13 @@ buildPythonPackage rec {
|
||||
sha256 = "469e505fd7ce75f600188bdb69a95641899d5b372f74246c8f308376b6929e9c";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
checkInputs = [ pytest pytest-repeat pytest-timeout mock joblib ];
|
||||
propagatedBuildInputs = [
|
||||
click cloudpickle dask msgpack psutil six
|
||||
sortedcontainers tblib toolz tornado zict pyyaml mpi4py bokeh
|
||||
] ++ lib.optionals (!isPy3k) [ futures singledispatch ];
|
||||
];
|
||||
|
||||
# tests take about 10-15 minutes
|
||||
# ignore 5 cli tests out of 1000 total tests that fail due to subprocesses
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-api-python-client";
|
||||
version = "1.12.1";
|
||||
version = "1.12.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "ddadc243ce627512c2a27e11d369f5ddf658ef80dbffb247787499486ef1ea98";
|
||||
sha256 = "54a7d330833a2e7b0587446d7e4ae6d0244925a9a8e1dfe878f3f7e06cdedb62";
|
||||
};
|
||||
|
||||
# No tests included in archive
|
||||
|
||||
31
pkgs/development/python-modules/google-crc32c/default.nix
Normal file
31
pkgs/development/python-modules/google-crc32c/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ lib, buildPythonPackage, isPy3k, fetchFromGitHub, cffi, crc32c, pytestCheckHook }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-crc32c";
|
||||
version = "1.0.0";
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "python-crc32c";
|
||||
rev = "v${version}";
|
||||
sha256 = "0n3ggsxmk1fhq0kz6p5rcj4gypfb05i26fcn7lsawakgl7fzxqyl";
|
||||
};
|
||||
|
||||
buildInputs = [ crc32c ];
|
||||
propagatedBuildInputs = [ cffi ];
|
||||
|
||||
LDFLAGS = "-L${crc32c}/lib";
|
||||
CFLAGS = "-I${crc32c}/include";
|
||||
|
||||
checkInputs = [ pytestCheckHook crc32c ];
|
||||
pythonImportsCheck = [ "google_crc32c" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/googleapis/python-crc32c";
|
||||
description = "Wrapper the google/crc32c hardware-based implementation of the CRC32C hashing algorithm";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ freezeboy ];
|
||||
};
|
||||
}
|
||||
@@ -1,30 +1,35 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchPypi
|
||||
, six
|
||||
, requests
|
||||
, setuptools
|
||||
, pytest
|
||||
, mock
|
||||
, crcmod
|
||||
, google-crc32c
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-resumable-media";
|
||||
version = "0.7.1";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "57841f5e65fb285c01071f439724745b2549a72eb75e5fd979198eb518608ed0";
|
||||
sha256 = "FzrMa63hSApSn6KcbCcXVDri3AnULpRh/bhvOVAu/PI=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest mock ];
|
||||
propagatedBuildInputs = [ requests setuptools six ];
|
||||
propagatedBuildInputs = [ requests setuptools six ]
|
||||
++ lib.optional isPy3k google-crc32c
|
||||
++ lib.optional (!isPy3k) crcmod;
|
||||
|
||||
checkPhase = ''
|
||||
py.test tests/unit
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Utilities for Google Media Downloads and Resumable Uploads";
|
||||
homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
|
||||
license = licenses.asl20;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, six
|
||||
, enum34
|
||||
, decorator
|
||||
, nose
|
||||
, krb5Full
|
||||
, darwin
|
||||
, isPy27
|
||||
, parameterized
|
||||
, shouldbe
|
||||
, cython
|
||||
@@ -18,13 +17,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gssapi";
|
||||
version = "1.6.2";
|
||||
version = "1.6.9";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pythongssapi";
|
||||
repo = "python-${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "195x3zqzyv491i9hf7l4asmic5pb2w3l1r7bps89651wkb3mrz1l";
|
||||
sha256 = "1shm3pc0l2r91qadkpq4bx45my0165nw3kdcp0gw4lk50z215hag";
|
||||
};
|
||||
|
||||
# It's used to locate headers
|
||||
@@ -41,7 +41,7 @@ buildPythonPackage rec {
|
||||
propagatedBuildInputs = [
|
||||
decorator
|
||||
six
|
||||
] ++ lib.optional isPy27 enum34;
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.GSS
|
||||
@@ -55,12 +55,21 @@ buildPythonPackage rec {
|
||||
six
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isDarwin; # many failures on darwin
|
||||
doCheck = pythonOlder "3.8" # `shouldbe` not available
|
||||
&& !stdenv.isDarwin; # many failures on darwin
|
||||
|
||||
# skip tests which fail possibly due to be an upstream issue (see
|
||||
# https://github.com/pythongssapi/python-gssapi/issues/220)
|
||||
checkPhase = ''
|
||||
# some tests don't respond to being disabled through nosetests -x
|
||||
echo $'\ndel CredsTestCase.test_add_with_impersonate' >> gssapi/tests/test_high_level.py
|
||||
echo $'\ndel TestBaseUtilities.test_acquire_creds_impersonate_name' >> gssapi/tests/test_raw.py
|
||||
echo $'\ndel TestBaseUtilities.test_add_cred_impersonate_name' >> gssapi/tests/test_raw.py
|
||||
|
||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
||||
${python.interpreter} setup.py nosetests
|
||||
${python.interpreter} setup.py nosetests -e 'ext_test_\d.*'
|
||||
'';
|
||||
pythonImportsCheck = [ "gssapi" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pypi.python.org/pypi/gssapi";
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "notebook";
|
||||
version = "6.1.3";
|
||||
version = "6.1.4";
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "9990d51b9931a31e681635899aeb198b4c4b41586a9e87fbfaaed1a71d0a05b6";
|
||||
sha256 = "0cnyi4zd3byh7zixdj2q71axm31xgjiyfklh1c63c87acgwh2zb8";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.utf8";
|
||||
@@ -67,6 +67,9 @@ buildPythonPackage rec {
|
||||
"TestInstallServerExtension"
|
||||
"launch_socket"
|
||||
"sock_server"
|
||||
] ++ lib.optional stdenv.isDarwin [
|
||||
"test_delete"
|
||||
"test_checkpoints_follow_file"
|
||||
];
|
||||
|
||||
# Some of the tests use localhost networking.
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "3.0.1";
|
||||
version = "2.3.0";
|
||||
pname = "pamqp";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0a9b49bde3f554ec49b47ebdb789133979985f24d5f4698935ed589a2d4392a4";
|
||||
sha256 = "1s4lwbsiikz3czqad7jarb7k303q0wamla0rirghvwl9bslgbl2w";
|
||||
};
|
||||
|
||||
buildInputs = [ mock nose pep8 pylint mccabe ];
|
||||
|
||||
@@ -1,119 +1,100 @@
|
||||
diff -ru PySDL2-0.9.6-old/sdl2/dll.py PySDL2-0.9.6/sdl2/dll.py
|
||||
--- PySDL2-0.9.6-old/sdl2/dll.py 2018-03-08 10:18:37.583471745 +0100
|
||||
+++ PySDL2-0.9.6/sdl2/dll.py 2018-03-08 10:20:06.705517520 +0100
|
||||
@@ -45,29 +45,31 @@
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/dll.py PySDL2-0.9.7/sdl2/dll.py
|
||||
--- PySDL2-0.9.7-old/sdl2/dll.py 2020-02-15 09:36:29.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/dll.py 2020-09-23 20:24:09.365497270 +0200
|
||||
@@ -94,15 +94,16 @@
|
||||
"""Function wrapper around the different DLL functions. Do not use or
|
||||
instantiate this one directly from your user code.
|
||||
"""
|
||||
- def __init__(self, libinfo, libnames, path=None):
|
||||
- self._dll = None
|
||||
+ def __init__(self, libinfo, libfile):
|
||||
self._dll = None
|
||||
self._libname = libinfo
|
||||
self._version = None
|
||||
- foundlibs = _findlib(libnames, path)
|
||||
- dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
- if len(foundlibs) == 0:
|
||||
- raise RuntimeError("could not find any library for %s (%s)" %
|
||||
- (libinfo, dllmsg))
|
||||
- for libfile in foundlibs:
|
||||
- try:
|
||||
- self._dll = CDLL(libfile)
|
||||
- self._libfile = libfile
|
||||
- break
|
||||
- except Exception as exc:
|
||||
- # Could not load the DLL, move to the next, but inform the user
|
||||
- # about something weird going on - this may become noisy, but
|
||||
- # is better than confusing the users with the RuntimeError below
|
||||
- warnings.warn(repr(exc), DLLWarning)
|
||||
- if self._dll is None:
|
||||
- raise RuntimeError("found %s, but it's not usable for the library %s" %
|
||||
- (foundlibs, libinfo))
|
||||
+ #foundlibs = _findlib(libnames, path)
|
||||
+ #dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
+ #if len(foundlibs) == 0:
|
||||
+ # raise RuntimeError("could not find any library for %s (%s)" %
|
||||
+ # (libinfo, dllmsg))
|
||||
+ foundlibs = [ libfile ]
|
||||
for libfile in foundlibs:
|
||||
try:
|
||||
self._dll = CDLL(libfile)
|
||||
@@ -117,9 +118,9 @@
|
||||
if self._dll is None:
|
||||
raise RuntimeError("found %s, but it's not usable for the library %s" %
|
||||
(foundlibs, libinfo))
|
||||
- if path is not None and sys.platform in ("win32",) and \
|
||||
- path in self._libfile:
|
||||
- os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
+ def __init__(self, libfile):
|
||||
+ self._dll = CDLL(libfile)
|
||||
+ self._libfile = libfile
|
||||
+ # self._dll = None
|
||||
+ # foundlibs = _findlib(libnames, path)
|
||||
+ # dllmsg = "PYSDL2_DLL_PATH: %s" % (os.getenv("PYSDL2_DLL_PATH") or "unset")
|
||||
+ # if len(foundlibs) == 0:
|
||||
+ # raise RuntimeError("could not find any library for %s (%s)" %
|
||||
+ # (libinfo, dllmsg))
|
||||
+ # for libfile in foundlibs:
|
||||
+ # try:
|
||||
+ # self._dll = CDLL(libfile)
|
||||
+ # self._libfile = libfile
|
||||
+ # break
|
||||
+ # except Exception as exc:
|
||||
+ # # Could not load the DLL, move to the next, but inform the user
|
||||
+ # # about something weird going on - this may become noisy, but
|
||||
+ # # is better than confusing the users with the RuntimeError below
|
||||
+ # warnings.warn(repr(exc), DLLWarning)
|
||||
+ # if self._dll is None:
|
||||
+ # raise RuntimeError("found %s, but it's not usable for the library %s" %
|
||||
+ # (foundlibs, libinfo))
|
||||
+ # if path is not None and sys.platform in ("win32",) and \
|
||||
+ # path in self._libfile:
|
||||
+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
+ #if path is not None and sys.platform in ("win32",) and \
|
||||
+ # path in self._libfile:
|
||||
+ # os.environ["PATH"] = "%s;%s" % (path, os.environ["PATH"])
|
||||
|
||||
def bind_function(self, funcname, args=None, returns=None, optfunc=None):
|
||||
def bind_function(self, funcname, args=None, returns=None, added=None):
|
||||
"""Binds the passed argument and return value types to the specified
|
||||
@@ -110,7 +112,7 @@
|
||||
@@ -220,7 +221,7 @@
|
||||
return
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2", ["SDL2", "SDL2-2.0"], os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2")
|
||||
+ dll = DLL("SDL2", "@sdl2@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.6-old/sdl2/sdlgfx.py PySDL2-0.9.6/sdl2/sdlgfx.py
|
||||
--- PySDL2-0.9.6-old/sdl2/sdlgfx.py 2018-03-08 10:18:37.585471769 +0100
|
||||
+++ PySDL2-0.9.6/sdl2/sdlgfx.py 2018-03-08 10:20:06.705517520 +0100
|
||||
@@ -34,8 +34,7 @@
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlgfx.py PySDL2-0.9.7/sdl2/sdlgfx.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlgfx.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlgfx.py 2020-09-23 20:23:56.997419129 +0200
|
||||
@@ -39,8 +39,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_gfx")
|
||||
+ dll = DLL("SDL2_gfx", "@sdl2_gfx@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.6-old/sdl2/sdlimage.py PySDL2-0.9.6/sdl2/sdlimage.py
|
||||
--- PySDL2-0.9.6-old/sdl2/sdlimage.py 2018-03-08 10:18:37.585471769 +0100
|
||||
+++ PySDL2-0.9.6/sdl2/sdlimage.py 2018-03-08 10:20:06.705517520 +0100
|
||||
@@ -26,8 +26,7 @@
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlimage.py PySDL2-0.9.7/sdl2/sdlimage.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlimage.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlimage.py 2020-09-23 20:23:50.085375658 +0200
|
||||
@@ -27,8 +27,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_image")
|
||||
+ dll = DLL("SDL2_image", "@sdl2_image@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.6-old/sdl2/sdlmixer.py PySDL2-0.9.6/sdl2/sdlmixer.py
|
||||
--- PySDL2-0.9.6-old/sdl2/sdlmixer.py 2018-03-08 10:18:37.585471769 +0100
|
||||
+++ PySDL2-0.9.6/sdl2/sdlmixer.py 2018-03-08 10:20:27.415758478 +0100
|
||||
@@ -50,8 +50,7 @@
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlmixer.py PySDL2-0.9.7/sdl2/sdlmixer.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlmixer.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlmixer.py 2020-09-23 20:23:46.117350771 +0200
|
||||
@@ -53,8 +53,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_mixer")
|
||||
+ dll = DLL("SDL2_mixer", "@sdl2_mixer@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
diff -ru PySDL2-0.9.6-old/sdl2/sdlttf.py PySDL2-0.9.6/sdl2/sdlttf.py
|
||||
--- PySDL2-0.9.6-old/sdl2/sdlttf.py 2018-03-08 10:18:37.585471769 +0100
|
||||
+++ PySDL2-0.9.6/sdl2/sdlttf.py 2018-03-08 10:20:06.705517520 +0100
|
||||
@@ -38,8 +38,7 @@
|
||||
diff -ru PySDL2-0.9.7-old/sdl2/sdlttf.py PySDL2-0.9.7/sdl2/sdlttf.py
|
||||
--- PySDL2-0.9.7-old/sdl2/sdlttf.py 2020-02-02 11:07:00.000000000 +0100
|
||||
+++ PySDL2-0.9.7/sdl2/sdlttf.py 2020-09-23 20:23:40.069312931 +0200
|
||||
@@ -39,8 +39,7 @@
|
||||
]
|
||||
|
||||
try:
|
||||
- dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"],
|
||||
- os.getenv("PYSDL2_DLL_PATH"))
|
||||
+ dll = DLL("SDL2_ttf")
|
||||
+ dll = DLL("SDL2_ttf", "@sdl2_ttf@")
|
||||
except RuntimeError as exc:
|
||||
raise ImportError(exc)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchPypi, buildPythonPackage, SDL2, SDL2_ttf, SDL2_image, SDL2_gfx, SDL2_mixer }:
|
||||
{ stdenv, lib, substituteAll, fetchPypi, buildPythonPackage, SDL2, SDL2_ttf, SDL2_image, SDL2_gfx, SDL2_mixer }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "PySDL2";
|
||||
@@ -18,19 +18,18 @@ buildPythonPackage rec {
|
||||
# which library they want to include.
|
||||
buildInputs = [ SDL2_ttf SDL2_image SDL2_gfx SDL2_mixer ];
|
||||
propagatedBuildInputs = [ SDL2 ];
|
||||
patches = [ ./PySDL2-dll.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace sdl2/dll.py --replace \
|
||||
"DLL(\"SDL2\")" "DLL('${SDL2}/lib/libSDL2${stdenv.hostPlatform.extensions.sharedLibrary}')"
|
||||
substituteInPlace sdl2/sdlttf.py --replace \
|
||||
"DLL(\"SDL2_ttf\")" "DLL('${SDL2_ttf}/lib/libSDL2_ttf${stdenv.hostPlatform.extensions.sharedLibrary}')"
|
||||
substituteInPlace sdl2/sdlimage.py --replace \
|
||||
"DLL(\"SDL2_image\")" "DLL('${SDL2_image}/lib/libSDL2_image${stdenv.hostPlatform.extensions.sharedLibrary}')"
|
||||
substituteInPlace sdl2/sdlgfx.py --replace \
|
||||
"DLL(\"SDL2_gfx\")" "DLL('${SDL2_gfx}/lib/libSDL2_gfx${stdenv.hostPlatform.extensions.sharedLibrary}')"
|
||||
substituteInPlace sdl2/sdlmixer.py --replace \
|
||||
"DLL(\"SDL2_mixer\")" "DLL('${SDL2_mixer}/lib/libSDL2_mixer${stdenv.hostPlatform.extensions.sharedLibrary}')"
|
||||
'';
|
||||
patches = [
|
||||
(substituteAll ({
|
||||
src = ./PySDL2-dll.patch;
|
||||
} // builtins.mapAttrs (_: pkg: "${pkg}/lib/lib${pkg.pname}${stdenv.hostPlatform.extensions.sharedLibrary}") {
|
||||
# substituteAll keys must start lowercase
|
||||
sdl2 = SDL2;
|
||||
sdl2_ttf = SDL2_ttf;
|
||||
sdl2_image = SDL2_image;
|
||||
sdl2_gfx = SDL2_gfx;
|
||||
sdl2_mixer = SDL2_mixer;
|
||||
}))
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A wrapper around the SDL2 library and as such similar to the discontinued PySDL project";
|
||||
|
||||
32
pkgs/development/python-modules/pytabix/default.nix
Normal file
32
pkgs/development/python-modules/pytabix/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchPypi
|
||||
, zlib
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytabix";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1ldp5r4ggskji6qx4bp2qxy2vrvb3fam03ksn0gq2hdxgrlg2x07";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
doCheck = !isPy3k;
|
||||
preCheck = ''
|
||||
substituteInPlace test/test.py \
|
||||
--replace 'test_remote_file' 'dont_test_remote_file'
|
||||
'';
|
||||
pythonImportsCheck = [ "tabix" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/slowkow/pytabix";
|
||||
description = "Python interface for tabix";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ris ];
|
||||
};
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "1.0.0";
|
||||
version = "2.0.1";
|
||||
pname = "rabbitpy";
|
||||
|
||||
# No tests in the pypi tarball, so we directly fetch from git
|
||||
@@ -15,7 +15,7 @@ buildPythonPackage rec {
|
||||
owner = "gmr";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6";
|
||||
sha256 = "0m5z3i3d5adrz1wh6y35xjlls3cq6p4y9p1mzghw3k7hdvg26cck";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pamqp ];
|
||||
@@ -31,7 +31,7 @@ buildPythonPackage rec {
|
||||
postPatch = ''
|
||||
# See: https://github.com/gmr/rabbitpy/issues/118
|
||||
substituteInPlace setup.py \
|
||||
--replace 'pamqp>=1.6.1,<2.0' 'pamqp'
|
||||
--replace 'pamqp>=2,<3' 'pamqp'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -49,7 +49,7 @@ buildPythonPackage rec {
|
||||
description = "A scikit offering extra ode/dae solvers, as an extension to what is available in scipy";
|
||||
homepage = "https://github.com/bmcage/odes";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ flokli idontgetoutmuch ];
|
||||
maintainers = with maintainers; [ idontgetoutmuch ];
|
||||
platforms = [ "aarch64-linux" "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
47
pkgs/development/python-modules/segments/default.nix
Normal file
47
pkgs/development/python-modules/segments/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy27
|
||||
, regex
|
||||
, csvw
|
||||
, clldutils
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
, pytest-mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "segments";
|
||||
version = "2.1.3";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cldf";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "12lnpk834r3y7hw5x7nvswa60ddh69ylvr44k46gqcfba160hhb0";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace setup.cfg --replace "--cov" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
regex
|
||||
csvw
|
||||
clldutils
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mock
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unicode Standard tokenization routines and orthography profile segmentation";
|
||||
homepage = "https://github.com/cldf/segments";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
, toolz
|
||||
, tornado
|
||||
, zict
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -38,6 +39,8 @@ buildPythonPackage rec {
|
||||
requests
|
||||
];
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
# Disable test_tcp_async because fails on sandbox build
|
||||
# disable kafka tests
|
||||
checkPhase = ''
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, regex
|
||||
, requests
|
||||
, numpy
|
||||
, parameterized
|
||||
, sacremoses
|
||||
, sentencepiece
|
||||
, timeout-decorator
|
||||
@@ -16,13 +17,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "transformers";
|
||||
version = "3.1.0";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "huggingface";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0wg36qrcljmpsyhjaxpqw3s1r6276yg8cq0bjrf52l4zlc5k4xzk";
|
||||
sha256 = "0jj94153kgdyklra30xcszxv11hwzfigzy82fgvgzvbwlxv3a1j5";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -38,6 +39,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
parameterized
|
||||
pytestCheckHook
|
||||
timeout-decorator
|
||||
];
|
||||
@@ -49,14 +51,17 @@ buildPythonPackage rec {
|
||||
|
||||
preCheck = ''
|
||||
export HOME="$TMPDIR"
|
||||
cd tests
|
||||
|
||||
# This test requires the nlp module, which we haven't
|
||||
# packaged yet. However, nlp is optional for transformers
|
||||
# itself
|
||||
rm test_trainer.py
|
||||
rm tests/test_trainer.py
|
||||
'';
|
||||
|
||||
# We have to run from the main directory for the tests. However,
|
||||
# letting pytest discover tests leads to errors.
|
||||
pytestFlagsArray = [ "tests" ];
|
||||
|
||||
# Disable tests that require network access.
|
||||
disabledTests = [
|
||||
"PegasusTokenizationTest"
|
||||
@@ -76,6 +81,7 @@ buildPythonPackage rec {
|
||||
"test_tokenizer_from_model_type"
|
||||
"test_tokenizer_from_model_type"
|
||||
"test_tokenizer_from_pretrained"
|
||||
"test_tokenizer_from_tokenizer_class"
|
||||
"test_tokenizer_identifier_with_correct_config"
|
||||
];
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, pytest, heapdict }:
|
||||
, pytest, heapdict, pythonOlder }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "zict";
|
||||
@@ -10,6 +10,8 @@ buildPythonPackage rec {
|
||||
sha256 = "8e2969797627c8a663575c2fc6fcb53a05e37cdb83ee65f341fc6e0c3d0ced16";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
propagatedBuildInputs = [ heapdict ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user