Merge master into staging-next
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi
|
||||
, unittest2 }:
|
||||
, isPyPy, isPy3k, unittest2
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "funcsigs";
|
||||
@@ -12,6 +13,9 @@ buildPythonPackage rec {
|
||||
|
||||
buildInputs = [ unittest2 ];
|
||||
|
||||
# https://github.com/testing-cabal/funcsigs/issues/10
|
||||
patches = stdenv.lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+";
|
||||
homepage = https://github.com/aliles/funcsigs;
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
diff --git a/tests/test_inspect.py b/tests/test_inspect.py
|
||||
index 98d6592..3a2a1f2 100644
|
||||
--- a/tests/test_inspect.py
|
||||
+++ b/tests/test_inspect.py
|
||||
@@ -8,6 +8,7 @@ import unittest2 as unittest
|
||||
|
||||
import funcsigs as inspect
|
||||
|
||||
+import platform
|
||||
|
||||
class TestSignatureObject(unittest.TestCase):
|
||||
@staticmethod
|
||||
@@ -409,7 +410,7 @@ def test_signature_on_decorated(self):
|
||||
Ellipsis))
|
||||
""")
|
||||
|
||||
- if sys.version_info[0] > 2:
|
||||
+ if sys.version_info[0] > 2 and platform.python_implementation() != "PyPy":
|
||||
exec("""
|
||||
def test_signature_on_class(self):
|
||||
class C:
|
||||
@@ -493,41 +494,44 @@ def test_signature_on_class(self):
|
||||
Ellipsis))
|
||||
""")
|
||||
|
||||
- def test_signature_on_callable_objects(self):
|
||||
- class Foo(object):
|
||||
- def __call__(self, a):
|
||||
- pass
|
||||
+ if platform.python_implementation() != "PyPy":
|
||||
+ exec("""
|
||||
+def test_signature_on_callable_objects(self):
|
||||
+ class Foo(object):
|
||||
+ def __call__(self, a):
|
||||
+ pass
|
||||
|
||||
- self.assertEqual(self.signature(Foo()),
|
||||
- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
- Ellipsis))
|
||||
+ self.assertEqual(self.signature(Foo()),
|
||||
+ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
+ Ellipsis))
|
||||
|
||||
- class Spam(object):
|
||||
- pass
|
||||
- with self.assertRaisesRegex(TypeError, "is not a callable object"):
|
||||
- inspect.signature(Spam())
|
||||
+ class Spam(object):
|
||||
+ pass
|
||||
+ with self.assertRaisesRegex(TypeError, "is not a callable object"):
|
||||
+ inspect.signature(Spam())
|
||||
|
||||
- class Bar(Spam, Foo):
|
||||
- pass
|
||||
+ class Bar(Spam, Foo):
|
||||
+ pass
|
||||
|
||||
- self.assertEqual(self.signature(Bar()),
|
||||
- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
- Ellipsis))
|
||||
+ self.assertEqual(self.signature(Bar()),
|
||||
+ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
+ Ellipsis))
|
||||
|
||||
- class ToFail(object):
|
||||
- __call__ = type
|
||||
- with self.assertRaisesRegex(ValueError, "not supported by signature"):
|
||||
- inspect.signature(ToFail())
|
||||
+ class ToFail(object):
|
||||
+ __call__ = type
|
||||
+ with self.assertRaisesRegex(ValueError, "not supported by signature"):
|
||||
+ inspect.signature(ToFail())
|
||||
|
||||
- if sys.version_info[0] < 3:
|
||||
- return
|
||||
+ if sys.version_info[0] < 3:
|
||||
+ return
|
||||
|
||||
- class Wrapped(object):
|
||||
- pass
|
||||
- Wrapped.__wrapped__ = lambda a: None
|
||||
- self.assertEqual(self.signature(Wrapped),
|
||||
- ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
- Ellipsis))
|
||||
+ class Wrapped(object):
|
||||
+ pass
|
||||
+ Wrapped.__wrapped__ = lambda a: None
|
||||
+ self.assertEqual(self.signature(Wrapped),
|
||||
+ ((('a', Ellipsis, Ellipsis, "positional_or_keyword"),),
|
||||
+ Ellipsis))
|
||||
+""")
|
||||
|
||||
def test_signature_on_lambdas(self):
|
||||
self.assertEqual(self.signature((lambda a=10: a)),
|
||||
@@ -6,6 +6,7 @@
|
||||
, httplib2
|
||||
, sure
|
||||
, nose
|
||||
, nose-exclude
|
||||
, coverage
|
||||
, certifi
|
||||
, urllib3
|
||||
@@ -24,18 +25,20 @@ buildPythonPackage rec {
|
||||
sha256 = "01b52d45077e702eda491f4fe75328d3468fd886aed5dcc530003e7b2b5939dc";
|
||||
};
|
||||
|
||||
checkInputs = [ nose sure coverage mock rednose
|
||||
# Following not declared in setup.py
|
||||
nose-randomly requests tornado httplib2
|
||||
];
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
checkInputs = [ nose sure coverage mock rednose
|
||||
# Following not declared in setup.py
|
||||
nose-randomly requests tornado httplib2 nose-exclude
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
NOSE_EXCLUDE = stdenv.lib.optionalString (stdenv.isAarch64) "tests.functional.test_httplib2.test_callback_response";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://falcao.it/HTTPretty/";
|
||||
homepage = "https://httpretty.readthedocs.org/";
|
||||
description = "HTTP client request mocking tool";
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
26
pkgs/development/python-modules/pyftdi/default.nix
Normal file
26
pkgs/development/python-modules/pyftdi/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, pyusb
|
||||
, pyserial
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyftdi";
|
||||
version = "0.29.4";
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0jy0xbqvmhy0nq9v86759d96raa8p52yq8ik3ji5kjlx7cizq67v";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pyusb pyserial ];
|
||||
|
||||
meta = {
|
||||
description = "User-space driver for modern FTDI devices";
|
||||
homepage = "http://github.com/eblot/pyftdi";
|
||||
license = lib.licenses.lgpl2;
|
||||
};
|
||||
}
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Pympler";
|
||||
version = "0.6";
|
||||
version = "0.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "c262ceca4dac67b8b523956833c52443420eabc3321a07185990b358b8ba13a7";
|
||||
sha256 = "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-axolotl";
|
||||
version = "0.1.42";
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "ef78c2efabcd4c33741669334bdda04710a3ef0e00b653f00127acff6460a7f0";
|
||||
sha256 = "1had4dq4n26c3hp62rbmhvs1dj3j3z2jhcbddnbsmqmiky8dqs39";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ cryptography python-axolotl-curve25519 protobuf ];
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sphinxcontrib-plantuml";
|
||||
version = "0.14";
|
||||
version = "0.15";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "504229e943e8ac821cd9d708124bde30041ae9d8341f9ea953866404527f4e82";
|
||||
sha256 = "06yl6aiw8gpq3wmi6wxy5lahfgbbmlw6nchq9h1ssi5lipwaxn7a";
|
||||
};
|
||||
|
||||
# No tests included.
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "uncompyle6";
|
||||
version = "3.2.6";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "3a40f4f4b8b02a8687bd98c598980bed38a4770e3de253847eafed4b7167d07f";
|
||||
sha256 = "096k1hipxxnsra5k86v6sm7bk1g0kb1f75yb44nvgf566kd6p119";
|
||||
};
|
||||
|
||||
checkInputs = [ nose pytest hypothesis six ];
|
||||
@@ -23,8 +23,9 @@ buildPythonPackage rec {
|
||||
|
||||
# six import errors (yet it is supplied...)
|
||||
checkPhase = ''
|
||||
pytest ./pytest --ignore=pytest/test_build_const_key_map.py \
|
||||
--ignore=pytest/test_grammar.py
|
||||
runHook preCheck
|
||||
pytest ./pytest --ignore=pytest/test_function_call.py
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
pname = "xcffib";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "12yc2r8967hknk829q1lbsw6b9z7qa25y8dx8kz6c9qnlc215vb8";
|
||||
sha256 = "1lf5plgfi92ir6bsjyjb9yvqjbxzh2cag33c8jl435iaxmnh76f3";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "xdis";
|
||||
version = "3.8.10";
|
||||
version = "4.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b00f37296edf2a4fe7b67b5d861c342426d442666d241674fdfc333936bd59bf";
|
||||
sha256 = "1ifakxxawyxw4w4p58m4xdc0c955miqyaq3dfbl386ipw0f50kyz";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
Reference in New Issue
Block a user