diff options
Diffstat (limited to 'pkgs/development/python-modules')
10 files changed, 281 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/aioimaplib/default.nix b/pkgs/development/python-modules/aioimaplib/default.nix new file mode 100644 index 00000000000..d335cbc556c --- /dev/null +++ b/pkgs/development/python-modules/aioimaplib/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder +, nose, asynctest, mock, pytz, tzlocal, imaplib2, docutils }: + +buildPythonPackage rec { + pname = "aioimaplib"; + version = "0.7.13"; + + # PyPI tarball doesn't ship tests + src = fetchFromGitHub { + owner = "bamthomas"; + repo = pname; + rev = version; + sha256 = "19yhk4ixfw46d0bvx6a40r23nvia5a83dzn5rzwaq1wdjr186bbn"; + }; + + disbaled = pythonOlder "3.4"; + + checkInputs = [ nose asynctest mock pytz tzlocal imaplib2 docutils ]; + + meta = with lib; { + description = "Python asyncio IMAP4rev1 client library"; + homepage = https://github.com/bamthomas/aioimaplib; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/asynctest/default.nix b/pkgs/development/python-modules/asynctest/default.nix new file mode 100644 index 00000000000..2b0348a8758 --- /dev/null +++ b/pkgs/development/python-modules/asynctest/default.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonPackage, fetchPypi, fetchFromGitHub, pythonOlder, python }: + +buildPythonPackage rec { + pname = "asynctest"; + version = "0.11.1"; + + disabled = pythonOlder "3.4"; + + # PyPI tarball doesn't ship test/__init__.py + src = fetchFromGitHub { + owner = "Martiusweb"; + repo = pname; + rev = "v${version}"; + sha256 = "1vvh5vbq2fbz6426figs85z8779r7svb4dp2v3xynhhv05nh2y6v"; + }; + + postPatch = '' + # Skip failing test, probably caused by file system access + substituteInPlace test/test_selector.py \ + --replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored" + ''; + + checkPhase = '' + ${python.interpreter} -m unittest test + ''; + + meta = with lib; { + description = "Enhance the standard unittest package with features for testing asyncio libraries"; + homepage = https://github.com/Martiusweb/asynctest; + license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/can/default.nix b/pkgs/development/python-modules/can/default.nix new file mode 100644 index 00000000000..fbb53828d2a --- /dev/null +++ b/pkgs/development/python-modules/can/default.nix @@ -0,0 +1,27 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyserial +, nose +, mock }: + +buildPythonPackage rec { + pname = "python-can"; + version = "2.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1c6zfd29ck9ffdklfb5xgxvfl52xdaqd89isykkypm1ll97yk2fs"; + }; + + propagatedBuildInputs = [ pyserial ]; + checkInputs = [ nose mock ]; + + meta = with lib; { + homepage = https://github.com/hardbyte/python-can; + description = "CAN support for Python"; + license = licenses.lgpl3; + maintainers = with maintainers; [ sorki ]; + }; +} diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix new file mode 100644 index 00000000000..99ac6c3ec45 --- /dev/null +++ b/pkgs/development/python-modules/canmatrix/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, python +, lxml +, xlwt +, xlrd +, XlsxWriter +, pyyaml +, future }: + +buildPythonPackage rec { + pname = "canmatrix"; + version = "0.6"; + + # uses fetchFromGitHub as PyPi release misses test/ dir + src = fetchFromGitHub { + owner = "ebroecker"; + repo = pname; + rev = version; + sha256 = "1lb0krhchja2jqfsh5lsfgmqcchs1pd38akvc407jfmll96f4yqz"; + }; + + checkPhase = '' + cd test + ${python.interpreter} ./test.py + ''; + + propagatedBuildInputs = + [ lxml + xlwt + xlrd + XlsxWriter + pyyaml + future + ]; + + meta = with lib; { + homepage = https://github.com/ebroecker/canmatrix; + description = "Support and convert several CAN (Controller Area Network) database formats .arxml .dbc .dbf .kcd .sym fibex xls(x)"; + license = licenses.bsd2; + maintainers = with maintainers; [ sorki ]; + }; +} + diff --git a/pkgs/development/python-modules/canopen/default.nix b/pkgs/development/python-modules/canopen/default.nix new file mode 100644 index 00000000000..08ae54e0b73 --- /dev/null +++ b/pkgs/development/python-modules/canopen/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, fetchFromGitHub +, nose +, can +, canmatrix }: + +buildPythonPackage rec { + pname = "canopen"; + version = "0.5.1"; + + # use fetchFromGitHub until version containing test/sample.eds + # is available on PyPi + # https://github.com/christiansandberg/canopen/pull/57 + + src = fetchFromGitHub { + owner = "christiansandberg"; + repo = "canopen"; + rev = "b20575d84c3aef790fe7c38c5fc77601bade0ea4"; + sha256 = "1qg47qrkyvyxiwi13sickrkk89jp9s91sly2y90bz0jhws2bxh64"; + }; + + #src = fetchPypi { + # inherit pname version; + # sha256 = "0806cykarpjb9ili3mf82hsd9gdydbks8532nxgz93qzg4zdbv2g"; + #}; + + # test_pdo failure https://github.com/christiansandberg/canopen/issues/58 + doCheck = false; + + propagatedBuildInputs = + [ can + canmatrix + ]; + + checkInputs = [ nose ]; + + meta = with lib; { + homepage = https://github.com/christiansandberg/canopen/; + description = "CANopen stack implementation"; + license = licenses.lgpl3; + maintainers = with maintainers; [ sorki ]; + }; +} diff --git a/pkgs/development/python-modules/imaplib2/default.nix b/pkgs/development/python-modules/imaplib2/default.nix new file mode 100644 index 00000000000..0ceff353f9a --- /dev/null +++ b/pkgs/development/python-modules/imaplib2/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "imaplib2"; + version = "2.45.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "a35b6d88258696e80aabecfb784e08730b8558fcaaa3061ff2c7f8637afbd0b3"; + }; + + # No tests on PyPI and no tags on GitHub :( + doCheck = false; + + meta = with lib; { + description = "A threaded Python IMAP4 client"; + homepage = https://github.com/bcoe/imaplib2; + # See https://github.com/bcoe/imaplib2/issues/25 + license = licenses.psfl; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/luftdaten/default.nix b/pkgs/development/python-modules/luftdaten/default.nix new file mode 100644 index 00000000000..dc40101284c --- /dev/null +++ b/pkgs/development/python-modules/luftdaten/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, isPy3k, fetchPypi, aiohttp, async-timeout }: + +buildPythonPackage rec { + pname = "luftdaten"; + version = "0.1.4"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "d3e3af830ad2b731c36af223bbb5d47d68aa3786b2965411216917a7381e1179"; + }; + + propagatedBuildInputs = [ aiohttp async-timeout ]; + + # No tests implemented + doCheck = false; + + meta = with lib; { + description = "Python API for interacting with luftdaten.info"; + homepage = https://github.com/fabaff/python-luftdaten; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/nose-parameterized/default.nix b/pkgs/development/python-modules/nose-parameterized/default.nix index 3c7cd077cdc..77b540fdef0 100644 --- a/pkgs/development/python-modules/nose-parameterized/default.nix +++ b/pkgs/development/python-modules/nose-parameterized/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchPypi, buildPythonPackage, nose, six, glibcLocales, isPy3k }: +{ fetchPypi, parameterized }: -buildPythonPackage rec { +parameterized.overrideAttrs (o: rec { pname = "nose-parameterized"; version = "0.6.0"; @@ -8,20 +8,4 @@ buildPythonPackage rec { inherit pname version; sha256 = "1khlabgib4161vn6alxsjaa8javriywgx9vydddi659gp9x6fpnk"; }; - - # Tests require some python3-isms but code works without. - doCheck = isPy3k; - - buildInputs = [ nose glibcLocales ]; - propagatedBuildInputs = [ six ]; - - checkPhase = '' - LC_ALL="en_US.UTF-8" nosetests -v - ''; - - meta = with stdenv.lib; { - description = "Parameterized testing with any Python test framework"; - homepage = https://pypi.python.org/pypi/nose-parameterized; - license = licenses.bsd3; - }; -} +}) diff --git a/pkgs/development/python-modules/parameterized/default.nix b/pkgs/development/python-modules/parameterized/default.nix new file mode 100644 index 00000000000..14b41fe950b --- /dev/null +++ b/pkgs/development/python-modules/parameterized/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchPypi, buildPythonPackage, nose, six, glibcLocales, isPy3k }: + +buildPythonPackage rec { + pname = "parameterized"; + version = "0.6.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1qj1939shm48d9ql6fm1nrdy4p7sdyj8clz1szh5swwpf1qqxxfa"; + }; + + # Tests require some python3-isms but code works without. + doCheck = isPy3k; + + checkInputs = [ nose glibcLocales ]; + propagatedBuildInputs = [ six ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests -v + ''; + + meta = with stdenv.lib; { + description = "Parameterized testing with any Python test framework"; + homepage = https://pypi.python.org/pypi/parameterized; + license = licenses.bsd3; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/development/python-modules/pybase64/default.nix b/pkgs/development/python-modules/pybase64/default.nix new file mode 100644 index 00000000000..c81d60ced4d --- /dev/null +++ b/pkgs/development/python-modules/pybase64/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage, stdenv, fetchPypi, parameterized, six, nose }: + +buildPythonPackage rec { + pname = "pybase64"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hggg69s5r8jyqdwyzri5sn3f19p7ayl0fjhjma0qzgfp7bk6zjc"; + }; + + propagatedBuildInputs = [ six ]; + checkInputs = [ parameterized nose ]; + + checkPhase = '' + nosetests + ''; + + meta = with stdenv.lib; { + homepage = https://pypi.python.org/pypi/pybase64; + description = "Fast Base64 encoding/decoding"; + license = licenses.bsd2; + maintainers = with maintainers; [ ma27 ]; + }; +} |