diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2017-11-02 00:29:12 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 00:29:12 -0200 |
commit | c07835a11bedd070aef2d2e86e7d03d579b560f3 (patch) | |
tree | 8b7f11859dd719c4d6dd7cfd83da5c541d5a6454 /pkgs/development/python-modules | |
parent | d3763a7164e7c8b1b269add0d0ed1e8f316bbdc9 (diff) | |
parent | bb6257bd3a22f79b00350966e9de0786cae26f5b (diff) | |
download | nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.gz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.bz2 nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.lz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.xz nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.tar.zst nixlib-c07835a11bedd070aef2d2e86e7d03d579b560f3.zip |
Merge branch 'master' into upd.lxqt
Diffstat (limited to 'pkgs/development/python-modules')
55 files changed, 1350 insertions, 70 deletions
diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix new file mode 100644 index 000000000000..06ad939cfa8b --- /dev/null +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchPypi, buildPythonPackage, pycodestyle }: + +buildPythonPackage rec { + pname = "autopep8"; + version = "1.3.3"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0c1gl648g2xnz3j0rsp71ld4i32zlglmqjvqf4q8r08jp3zpny7z"; + }; + + propagatedBuildInputs = [ pycodestyle ]; + + # One test fails: + # FAIL: test_recursive_should_not_crash_on_unicode_filename (test.test_autopep8.CommandLineTests) + doCheck = false; + + meta = with stdenv.lib; { + description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"; + homepage = https://pypi.python.org/pypi/autopep8/; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/bitstring/default.nix b/pkgs/development/python-modules/bitstring/default.nix new file mode 100644 index 000000000000..f6c56646dcb9 --- /dev/null +++ b/pkgs/development/python-modules/bitstring/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "bitstring"; + version = "3.1.5"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1algq30j6rz12b1902bpw7iijx5lhrfqhl80d4ac6xzkrrpshqy1"; + extension = "zip"; + }; + + meta = with stdenv.lib; { + description = "Module for binary data manipulation"; + homepage = "https://github.com/scott-griffiths/bitstring"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/blockdiag/default.nix b/pkgs/development/python-modules/blockdiag/default.nix new file mode 100644 index 000000000000..fed6f6e9219e --- /dev/null +++ b/pkgs/development/python-modules/blockdiag/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, buildPythonPackage, pep8, nose, unittest2, docutils +, pillow, webcolors, funcparserlib +}: + +buildPythonPackage rec { + name = "blockdiag-${version}"; + version = "1.5.3"; + + src = fetchurl { + url = "https://bitbucket.org/blockdiag/blockdiag/get/${version}.tar.bz2"; + sha256 = "0r0qbmv0ijnqidsgm2rqs162y9aixmnkmzgnzgk52hiy7ydm4k8f"; + }; + + buildInputs = [ pep8 nose unittest2 docutils ]; + + propagatedBuildInputs = [ pillow webcolors funcparserlib ]; + + # One test fails: + # ... + # FAIL: test_auto_font_detection (blockdiag.tests.test_boot_params.TestBootParams) + doCheck = false; + + meta = with stdenv.lib; { + description = "Generate block-diagram image from spec-text file (similar to Graphviz)"; + homepage = http://blockdiag.com/; + license = licenses.asl20; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/bpython/default.nix b/pkgs/development/python-modules/bpython/default.nix new file mode 100644 index 000000000000..515494b5f931 --- /dev/null +++ b/pkgs/development/python-modules/bpython/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchurl, pygments, greenlet, curtsies, urwid, requests, mock }: + +buildPythonPackage rec { + pname = "bpython"; + version = "0.17"; + name = "${pname}-${version}"; + + # 0.17 is still missing on PyPI, https://github.com/bpython/bpython/issues/706 + src = fetchurl { + url = "https://bpython-interpreter.org/releases/${pname}-${version}.tar.gz"; + sha256 = "13fyyx06645ikvmj9zmkixr12kzk1c3a3f9s9i2rvaczjycn82lz"; + }; + + propagatedBuildInputs = [ curtsies greenlet pygments requests urwid ]; + + checkInputs = [ mock ]; + + # tests fail: https://github.com/bpython/bpython/issues/712 + doCheck = false; + + meta = with stdenv.lib; { + description = "A fancy curses interface to the Python interactive interpreter"; + homepage = "https://bpython-interpreter.org/"; + license = licenses.mit; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/cffi/clang.patch b/pkgs/development/python-modules/cffi/clang.patch new file mode 100644 index 000000000000..27674edb58b4 --- /dev/null +++ b/pkgs/development/python-modules/cffi/clang.patch @@ -0,0 +1,13 @@ +diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py +index a3277b0..0d6e2c3 100644 +--- a/testing/cffi1/test_recompiler.py ++++ b/testing/cffi1/test_recompiler.py +@@ -2270,7 +2270,7 @@ def test_char16_char32_type(no_cpp=False): + char32_t foo_4bytes(char32_t); + """) + lib = verify(ffi, "test_char16_char32_type" + no_cpp * "_nocpp", """ +- #if !defined(__cplusplus) || __cplusplus < 201103L ++ #if !defined(__cplusplus) + typedef uint_least16_t char16_t; + typedef uint_least32_t char32_t; + #endif diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 5c99e77af56b..b0524b4121ad 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: +{ stdenv, buildPythonPackage, isPy27, isPyPy, fetchPypi, libffi, pycparser, pytest }: if isPyPy then null else buildPythonPackage rec { pname = "cffi"; @@ -10,13 +10,15 @@ if isPyPy then null else buildPythonPackage rec { sha256 = "ab87dd91c0c4073758d07334c1e5f712ce8fe48f007b86f8238773963ee700a6"; }; + patches = stdenv.lib.optional (isPy27 && stdenv.cc.isClang) ./clang.patch; + outputs = [ "out" "dev" ]; propagatedBuildInputs = [ libffi pycparser ]; buildInputs = [ pytest ]; # The tests use -Werror but with python3.6 clang detects some unreachable code. - NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isClang "-Wno-unreachable-code"; + NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; checkPhase = '' py.test diff --git a/pkgs/development/python-modules/construct/default.nix b/pkgs/development/python-modules/construct/default.nix new file mode 100644 index 000000000000..9d8e61d1f450 --- /dev/null +++ b/pkgs/development/python-modules/construct/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, six, pythonOlder }: + +buildPythonPackage rec { + name = "construct-${version}"; + version = "2.8.16"; + + src = fetchFromGitHub { + owner = "construct"; + repo = "construct"; + rev = "v${version}"; + sha256 = "0lzz1dy419n254qccch7yx4nkpwd0fsyjhnsnaf6ysgwzqxxv63j"; + }; + + propagatedBuildInputs = [ six ]; + + # Tests fail with the following error on Python 3.5+ + # TypeError: not all arguments converted during string formatting + doCheck = pythonOlder "3.5"; + + meta = with stdenv.lib; { + description = "Powerful declarative parser (and builder) for binary data"; + homepage = http://construct.readthedocs.org/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix new file mode 100644 index 000000000000..a1e5f2352356 --- /dev/null +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchPypi, blessings, mock, nose, pyte, pytest, wcwidth }: + +buildPythonPackage rec { + pname = "curtsies"; + version = "0.2.11"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"; + }; + + propagatedBuildInputs = [ blessings wcwidth pyte ]; + + checkInputs = [ nose mock pytest ]; + + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + description = "Curses-like terminal wrapper, with colored strings!"; + homepage = https://pypi.python.org/pypi/curtsies; + license = licenses.mit; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/cytoolz/default.nix b/pkgs/development/python-modules/cytoolz/default.nix new file mode 100644 index 000000000000..dcb4e9474c3b --- /dev/null +++ b/pkgs/development/python-modules/cytoolz/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPyPy +, nose +, toolz +, python +}: + +buildPythonPackage rec { + pname = "cytoolz"; + version = "0.8.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "476a2ad176de5eaef80499b7b43d4f72ba6d23df33d349088dae315e9b31c552"; + }; + + # Extension types + disabled = isPyPy; + + checkInputs = [ nose ]; + propagatedBuildInputs = [ toolz ]; + + # Disable failing test https://github.com/pytoolz/cytoolz/issues/97 + checkPhase = '' + NOSE_EXCLUDE=test_curried_exceptions nosetests -v $out/${python.sitePackages} + ''; + + meta = { + homepage = "http://github.com/pytoolz/cytoolz/"; + description = "Cython implementation of Toolz: High performance functional utilities"; + license = "licenses.bsd3"; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/datashape/default.nix b/pkgs/development/python-modules/datashape/default.nix new file mode 100644 index 000000000000..81ead8431695 --- /dev/null +++ b/pkgs/development/python-modules/datashape/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, mock +, numpy +, multipledispatch +, dateutil +}: + +buildPythonPackage rec { + pname = "datashape"; + version = "0.5.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "2356ea690c3cf003c1468a243a9063144235de45b080b3652de4f3d44e57d783"; + }; + + checkInputs = [ pytest mock ]; + propagatedBuildInputs = [ numpy multipledispatch dateutil ]; + + checkPhase = '' + py.test datashape/tests + ''; + + meta = { + homepage = https://github.com/ContinuumIO/datashape; + description = "A data description language"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/demjson/default.nix b/pkgs/development/python-modules/demjson/default.nix new file mode 100644 index 000000000000..4f5d7a11bd8f --- /dev/null +++ b/pkgs/development/python-modules/demjson/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPy36 }: + +buildPythonPackage rec { + pname = "demjson"; + version = "2.2.4"; + name = "${pname}-${version}"; + disabled = isPy36; + + src = fetchPypi { + inherit pname version; + sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii"; + }; + + meta = with stdenv.lib; { + description = "Encoder/decoder and lint/validator for JSON (JavaScript Object Notation)"; + homepage = http://deron.meranda.us/python/demjson/; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ bjornfor ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/python-modules/dpkt/default.nix b/pkgs/development/python-modules/dpkt/default.nix new file mode 100644 index 000000000000..43c318fc7c3e --- /dev/null +++ b/pkgs/development/python-modules/dpkt/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchPypi, buildPythonPackage }: + +buildPythonPackage rec { + pname = "dpkt"; + version = "1.9.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0rr9ygczhxkfb61778jx0cxs0sq46zwlcj5l3wn6xmd3iy3yx9y6"; + }; + + meta = with stdenv.lib; { + description = "Fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols"; + homepage = https://code.google.com/p/dpkt/; + license = licenses.bsd3; + maintainers = with maintainers; [ bjornfor ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/python-modules/gevent/default.nix b/pkgs/development/python-modules/gevent/default.nix new file mode 100644 index 000000000000..8a3d3b3d09b7 --- /dev/null +++ b/pkgs/development/python-modules/gevent/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, buildPythonPackage, isPyPy, python, libev, greenlet }: + +buildPythonPackage rec { + name = "gevent-1.1.2"; + + src = fetchurl { + url = "mirror://pypi/g/gevent/${name}.tar.gz"; + sha256 = "cb15cf73d69a2eeefed330858f09634e2c50bf46da9f9e7635730fcfb872c02c"; + }; + + # Why do we have this patch? + postPatch = '' + substituteInPlace libev/ev.c --replace \ + "ecb_inline void ecb_unreachable (void) ecb_noreturn" \ + "ecb_inline ecb_noreturn void ecb_unreachable (void)" + ''; + + buildInputs = [ libev ]; + propagatedBuildInputs = stdenv.lib.optionals (!isPyPy) [ greenlet ]; + + checkPhase = '' + cd greentest + ${python.interpreter} testrunner.py + ''; + + # Bunch of failures. + doCheck = false; + + meta = with stdenv.lib; { + description = "Coroutine-based networking library"; + homepage = http://www.gevent.org/; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/ipython_genutils/default.nix b/pkgs/development/python-modules/ipython_genutils/default.nix new file mode 100644 index 000000000000..503ccb37d57e --- /dev/null +++ b/pkgs/development/python-modules/ipython_genutils/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +, glibcLocales +}: + +buildPythonPackage rec { + pname = "ipython_genutils"; + version = "0.2.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"; + }; + + checkInputs = [ nose glibcLocales ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests -v ipython_genutils/tests + ''; + + meta = { + description = "Vestigial utilities from IPython"; + homepage = http://ipython.org/; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/jug/default.nix b/pkgs/development/python-modules/jug/default.nix new file mode 100644 index 000000000000..ab94d7b40acb --- /dev/null +++ b/pkgs/development/python-modules/jug/default.nix @@ -0,0 +1,31 @@ +{ stdenv, buildPythonPackage, fetchPypi +, nose, numpy +, bottle, pyyaml, redis, six +, zlib }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "Jug"; + version = "1.6.3"; + buildInputs = [ nose numpy ]; + propagatedBuildInputs = [ + bottle + pyyaml + redis + six + + zlib + ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0dpcwjaf8zzqpdz8w8h0p7vmd6z6bzfz2805a6bdjqs9hhkhrg86"; + }; + + meta = with stdenv.lib; { + description = "A Task-Based Parallelization Framework"; + license = licenses.mit; + url = https://jug.readthedocs.io/; + maintainers = with maintainers; [ luispedro ]; + }; +} diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix new file mode 100644 index 000000000000..2746f1616682 --- /dev/null +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchurl, pkgs, pytestrunner }: + +let + pname = "keyutils"; + version = "0.5"; +in buildPythonPackage rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://pypi/k/${pname}/${name}.tar.gz"; + sha256 = "0dskys71vkn59vlsfs1ljli0qnzk7b10iv4pawxawnk2hvyjrf10"; + }; + + buildInputs = [ pkgs.keyutils pytestrunner ]; + + doCheck = false; + + meta = { + description = "A set of python bindings for keyutils"; + homepage = https://github.com/sassoftware/python-keyutils; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix new file mode 100644 index 000000000000..7c907d1e5ef3 --- /dev/null +++ b/pkgs/development/python-modules/llfuse/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, buildPythonPackage, pkgconfig, pytest, fuse, attr, which +, contextlib2 +}: + +buildPythonPackage rec { + name = "llfuse-1.0"; + + src = fetchurl { + url = "mirror://pypi/l/llfuse/${name}.tar.bz2"; + sha256 = "1li7q04ljrvwharw4fblcbfhvk6s0l3lnv8yqb4c22lcgbkiqlps"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ pytest fuse attr which ]; + + propagatedBuildInputs = [ contextlib2 ]; + + checkPhase = '' + py.test + ''; + + # FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin' + doCheck = false; + + meta = with stdenv.lib; { + description = "Python bindings for the low-level FUSE API"; + homepage = https://code.google.com/p/python-llfuse/; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/multidict/default.nix b/pkgs/development/python-modules/multidict/default.nix index cf05cbff631d..8d9340625e1c 100644 --- a/pkgs/development/python-modules/multidict/default.nix +++ b/pkgs/development/python-modules/multidict/default.nix @@ -1,9 +1,9 @@ { lib , fetchurl , buildPythonPackage -, pytest +, cython +, pytest, psutil, pytestrunner , isPy3k -, psutil }: let @@ -17,11 +17,8 @@ in buildPythonPackage rec { sha256 = "e76909da2fad6966281d4e0e4ccfd3c3025699ebcc30806afa09fa1384c3532b"; }; - checkInputs = [ pytest psutil ]; - - checkPhase = '' - py.test - ''; + buildInputs = [ cython ]; + checkInputs = [ pytest psutil pytestrunner ]; disabled = !isPy3k; @@ -30,4 +27,4 @@ in buildPythonPackage rec { homepage = https://github.com/aio-libs/multidict/; license = lib.licenses.asl20; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/multipledispatch/default.nix b/pkgs/development/python-modules/multipledispatch/default.nix new file mode 100644 index 000000000000..d1c392106077 --- /dev/null +++ b/pkgs/development/python-modules/multipledispatch/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "multipledispatch"; + version = "0.4.9"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "bda6abb8188d9abb429bd17ed15bc7433f77f1b05a78cfff761711ed81daa7a2"; + }; + + # No tests in archive + doCheck = false; + + meta = { + homepage = http://github.com/mrocklin/multipledispatch/; + description = "A relatively sane approach to multiple dispatch in Python"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/nose-exclude/default.nix b/pkgs/development/python-modules/nose-exclude/default.nix new file mode 100644 index 000000000000..d9ec2f85fa25 --- /dev/null +++ b/pkgs/development/python-modules/nose-exclude/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +}: + +buildPythonPackage rec { + pname = "nose-exclude"; + version = "0.5.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "f78fa8b41eeb815f0486414f710f1eea0949e346cfb11d59ba6295ed69e84304"; + }; + + propagatedBuildInputs = [ nose ]; + + meta = { + license = lib.licenses.lgpl21; + description = "Exclude specific directories from nosetests runs"; + homepage = https://github.com/kgrandis/nose-exclude; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/numtraits/default.nix b/pkgs/development/python-modules/numtraits/default.nix new file mode 100644 index 000000000000..858b5ae594ae --- /dev/null +++ b/pkgs/development/python-modules/numtraits/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, six +, numpy +, traitlets +}: + +buildPythonPackage rec { + pname = "numtraits"; + version = "0.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "2fca9a6c9334f7358ef1a3e2e64ccaa6a479fc99fc096910e0d5fbe8edcdfd7e"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ six numpy traitlets]; + + checkPhase = '' + py.test + ''; + + meta = { + description = "Numerical traits for Python objects"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ fridh ]; + homepage = https://github.com/astrofrog/numtraits; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/nwdiag/default.nix b/pkgs/development/python-modules/nwdiag/default.nix new file mode 100644 index 000000000000..ebf7ce944c11 --- /dev/null +++ b/pkgs/development/python-modules/nwdiag/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, buildPythonPackage, pep8, nose, unittest2, docutils +, blockdiag +}: + +buildPythonPackage rec { + name = "nwdiag-1.0.3"; + + src = fetchurl { + url = "mirror://pypi/n/nwdiag/${name}.tar.gz"; + sha256 = "0n7ary1fngxk8bk15vabc8fhnmxlh098piciwaviwn7l4a5q1zys"; + }; + + buildInputs = [ pep8 nose unittest2 docutils ]; + + propagatedBuildInputs = [ blockdiag ]; + + # tests fail + doCheck = false; + + meta = with stdenv.lib; { + description = "Generate network-diagram image from spec-text file (similar to Graphviz)"; + homepage = http://blockdiag.com/; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/odo/default.nix b/pkgs/development/python-modules/odo/default.nix new file mode 100644 index 000000000000..73b3f0be1503 --- /dev/null +++ b/pkgs/development/python-modules/odo/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, datashape +, numpy +, pandas +, toolz +, multipledispatch +, networkx +}: + +buildPythonPackage rec { + pname = "odo"; + version= "0.5.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1mh5k69d9ph9jd07jl9yqh78rbnh5cjspi1q530v3ml7ivjzz4p8"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ datashape numpy pandas toolz multipledispatch networkx ]; + + checkPhase = '' + py.test odo/tests + ''; + + meta = { + homepage = https://github.com/ContinuumIO/odo; + description = "Data migration utilities"; + license = lib.licenses.bsdOriginal; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/ofxclient/default.nix b/pkgs/development/python-modules/ofxclient/default.nix index c7877675530a..3b5fa1f531a2 100644 --- a/pkgs/development/python-modules/ofxclient/default.nix +++ b/pkgs/development/python-modules/ofxclient/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi, - ofxhome, ofxparse, beautifulsoup, lxml, keyring + ofxhome, ofxparse, beautifulsoup4, lxml, keyring }: buildPythonPackage rec { @@ -19,7 +19,7 @@ buildPythonPackage rec { # ImportError: No module named tests doCheck = false; - propagatedBuildInputs = [ ofxhome ofxparse beautifulsoup lxml keyring ]; + propagatedBuildInputs = [ ofxhome ofxparse beautifulsoup4 lxml keyring ]; meta = with stdenv.lib; { homepage = https://github.com/captin411/ofxclient; diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 7bab184bb2a0..2cbb67545a06 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -8,6 +8,7 @@ , cython , dateutil , scipy +, moto , numexpr , pytz , xlrd @@ -27,12 +28,12 @@ let inherit (stdenv) isDarwin; in buildPythonPackage rec { pname = "pandas"; - version = "0.20.3"; + version = "0.21.0"; name = "${pname}-${version}"; src = fetchPypi { inherit pname version; - sha256 = "a777e07633d83d546c55706420179551c8e01075b53c497dcf8ae4036766bc66"; + sha256 = "0nf50ls2cnlsd2635nyji7l70xc91dw81qg5y01g5sifwwqcpmaw"; }; LC_ALL = "en_US.UTF-8"; @@ -64,6 +65,7 @@ in buildPythonPackage rec { "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" ''; + checkInputs = [ moto ]; checkPhase = '' runHook preCheck '' diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index 2c297d8d7193..d916f9b95b1d 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, buildPythonPackage, pip, pytest, click, six, first -, setuptools_scm, glibcLocales, mock }: +, setuptools_scm, git, glibcLocales, mock }: buildPythonPackage rec { pname = "pip-tools"; @@ -12,12 +12,18 @@ buildPythonPackage rec { }; LC_ALL = "en_US.UTF-8"; - checkInputs = [ pytest glibcLocales mock ]; + checkInputs = [ pytest git glibcLocales mock ]; propagatedBuildInputs = [ pip click six first setuptools_scm ]; checkPhase = '' - export HOME=$(mktemp -d) - py.test -k "not test_realistic_complex_sub_dependencies" # requires network + export HOME=$(mktemp -d) VIRTUAL_ENV=1 + tests_without_network_access=" + not test_realistic_complex_sub_dependencies \ + and not test_editable_package_vcs \ + and not test_generate_hashes_all_platforms \ + and not test_generate_hashes_without_interfering_with_each_other \ + " + py.test -k "$tests_without_network_access" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix new file mode 100644 index 000000000000..57f7c2c317dc --- /dev/null +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPy3k +, Mako, packaging, pysocks, pygments, ROPGadget +, capstone, paramiko, pip, psutil +, pyelftools, pypandoc, pyserial, dateutil +, requests, tox, pandoc, unicorn, intervaltree }: + +buildPythonPackage rec { + version = "3.10.0"; + pname = "pwntools"; + name = "pwntools-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1l8hb30mwxqd1y7r5ihd7kzmjm2mz6m5aiphd3hwzmxkmxbxj8zk"; + }; + + propagatedBuildInputs = [ Mako packaging pysocks pygments ROPGadget capstone paramiko pip psutil pyelftools pypandoc pyserial dateutil requests tox pandoc unicorn intervaltree ]; + + disabled = isPy3k; + + meta = with stdenv.lib; { + homepage = "http://pwntools.com"; + description = "CTF framework and exploit development library"; + license = licenses.mit; + maintainers = with maintainers; [ bennofs kristoff3r ]; + }; +} diff --git a/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch b/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch deleted file mode 100644 index 4e36612d80d0..000000000000 --- a/pkgs/development/python-modules/pycdio/add-cdtext-toc.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Nurp pycdio-0.20-orig/test/cdtext.toc pycdio-0.20/test/cdtext.toc ---- pycdio-0.20-orig/test/cdtext.toc 1970-01-01 01:00:00.000000000 +0100 -+++ pycdio-0.20/test/cdtext.toc 2014-11-06 23:36:12.520708320 +0100 -@@ -0,0 +1,48 @@ -+CD_DA -+ -+// global CD-TEXT data -+ -+CD_TEXT { -+ -+ // Mapping from language number (0..7) used in 'LANGUAGE' statements -+ // to language code. -+/// LANGUAGE_MAP { -+/// 0 : EN // 9 is the code for ENGLISH, -+/// // I don't know any other language code, yet -+/// } -+ -+ // Language number should always start with 0 -+ LANGUAGE 0 { -+ // Required fields - at least all CD-TEXT CDs I've seen so far have them. -+ TITLE "CD Title" -+ PERFORMER "Performer" -+ DISC_ID "XY12345" -+ UPC_EAN "" // usually empty -+ -+ // Further possible items, all of them are optional -+ ARRANGER "" -+ SONGWRITER "" -+ MESSAGE "" -+ GENRE "" // I'm not sure if this should be really ascii data -+ } -+} -+ -+ -+TRACK AUDIO -+// track specific CD-TEXT data -+CD_TEXT { -+ LANGUAGE 0 { -+ // if an item is defined for one track it should be defined for all tracks -+ TITLE "Track Title" -+ -+ PERFORMER "Performer" -+ ISRC "US-XX1-98-01234" -+ -+ ARRANGER "" -+ SONGWRITER "" -+ MESSAGE "" -+ } -+} -+ -+SILENCE 1:0:0 -+ diff --git a/pkgs/development/python-modules/pycollada/default.nix b/pkgs/development/python-modules/pycollada/default.nix new file mode 100644 index 000000000000..948d9741bd8b --- /dev/null +++ b/pkgs/development/python-modules/pycollada/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchPypi, buildPythonPackage, numpy, isPy3k, dateutil, dateutil_1_5 }: + +buildPythonPackage rec { + pname = "pycollada"; + version = "0.5"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1g96maw2c25l4i3ks51784h33zf7s18vrn6iyz4ca34iy4sl7yq9"; + }; + + buildInputs = [ numpy ] ++ (if isPy3k then [dateutil] else [dateutil_1_5]); + + # Some tests fail because they refer to test data files that don't exist + # (upstream packaging issue) + doCheck = false; + + meta = with stdenv.lib; { + description = "Python library for reading and writing collada documents"; + homepage = http://pycollada.github.io/; + license = "BSD"; # they don't specify which BSD variant + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/pyev/default.nix b/pkgs/development/python-modules/pyev/default.nix new file mode 100644 index 000000000000..db06fedd68cc --- /dev/null +++ b/pkgs/development/python-modules/pyev/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, buildPythonPackage, libev }: + +buildPythonPackage rec { + name = "pyev-0.9.0"; + + src = fetchurl { + url = "mirror://pypi/p/pyev/${name}.tar.gz"; + sha256 = "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"; + }; + + buildInputs = [ libev ]; + + libEvSharedLibrary = + if !stdenv.isDarwin + then "${libev}/lib/libev.so.4" + else "${libev}/lib/libev.4.dylib"; + + postPatch = '' + test -f "${libEvSharedLibrary}" || { echo "ERROR: File ${libEvSharedLibrary} does not exist, please fix nix expression for pyev"; exit 1; } + sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"${libEvSharedLibrary}\"|" setup.py + ''; + + meta = with stdenv.lib; { + description = "Python bindings for libev"; + homepage = https://code.google.com/p/pyev/; + license = licenses.gpl3; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/pyodbc/default.nix b/pkgs/development/python-modules/pyodbc/default.nix new file mode 100644 index 000000000000..c09e15f4bfb3 --- /dev/null +++ b/pkgs/development/python-modules/pyodbc/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPyPy, libiodbc }: + +buildPythonPackage rec { + pname = "pyodbc"; + version = "4.0.19"; + name = "${pname}-${version}"; + disabled = isPyPy; # use pypypdbc instead + + src = fetchPypi { + inherit pname version; + sha256 = "05mkaxbi9n02bpr3l0qnyfb3458f35hk71bq8jmadikp3h8al7dg"; + }; + + buildInputs = [ libiodbc ]; + + meta = with stdenv.lib; { + description = "Python ODBC module to connect to almost any database"; + homepage = "https://github.com/mkleehammer/pyodbc"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/pyro/default.nix b/pkgs/development/python-modules/pyro/default.nix new file mode 100644 index 000000000000..dbad83bef7e7 --- /dev/null +++ b/pkgs/development/python-modules/pyro/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, buildPythonPackage, isPy3k }: + +buildPythonPackage rec { + name = "Pyro-3.16"; + disabled = isPy3k; + + src = fetchurl { + url = "mirror://pypi/P/Pyro/${name}.tar.gz"; + sha256 = "1bed508453ef7a7556b51424a58101af2349b662baab7e7331c5cb85dbe7e578"; + }; + + meta = with stdenv.lib; { + description = "Distributed object middleware for Python (IPC/RPC)"; + homepage = http://pythonhosted.org/Pyro/; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/pysoundfile/default.nix b/pkgs/development/python-modules/pysoundfile/default.nix new file mode 100644 index 000000000000..fe24f0203f0d --- /dev/null +++ b/pkgs/development/python-modules/pysoundfile/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, numpy +, libsndfile +, cffi +, isPyPy +, stdenv +}: + +buildPythonPackage rec { + pname = "PySoundFile"; + name = "PySoundFile-${version}"; + version = "0.8.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "72c3e23b7c9998460ec78176084ea101e3439596ab29df476bc8508708df84df"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ numpy libsndfile cffi ]; + + meta = { + description = "An audio library based on libsndfile, CFFI and NumPy"; + license = lib.licenses.bsd3; + homepage = https://github.com/bastibe/PySoundFile; + maintainers = with lib.maintainers; [ fridh ]; + }; + + prePatch = '' + substituteInPlace soundfile.py --replace "'sndfile'" "'${libsndfile.out}/lib/libsndfile.so'" + ''; + + # https://github.com/bastibe/PySoundFile/issues/157 + disabled = isPyPy || stdenv.isi686; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/pyte/default.nix b/pkgs/development/python-modules/pyte/default.nix new file mode 100644 index 000000000000..2bd710705815 --- /dev/null +++ b/pkgs/development/python-modules/pyte/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest, pytestrunner, wcwidth }: + +buildPythonPackage rec { + pname = "pyte"; + version = "0.7.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"; + }; + + propagatedBuildInputs = [ wcwidth ]; + + checkInputs = [ pytest pytestrunner ]; + + # tries to write to os.path.dirname(__file__) in test_input_output + checkPhase = '' + py.test -k "not test_input_output" + ''; + + meta = with stdenv.lib; { + description = "Simple VTXXX-compatible linux terminal emulator"; + homepage = https://github.com/selectel/pyte; + license = licenses.lgpl3; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/development/python-modules/pyusb/default.nix b/pkgs/development/python-modules/pyusb/default.nix new file mode 100644 index 000000000000..6ba6794bfd13 --- /dev/null +++ b/pkgs/development/python-modules/pyusb/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchPypi, buildPythonPackage, libusb, libusb1 }: + +buildPythonPackage rec { + pname = "pyusb"; + version = "1.0.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qkk2jn270jwwl1x26hmdhb14m9kkbrzzwzizdjcl1a29b6756sf"; + }; + + # Fix the USB backend library lookup + postPatch = + '' + libusb=${libusb1.out}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary} + test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py + ''; + + propagatedBuildInputs = [ libusb ]; + + # No tests included + doCheck = false; + + meta = with stdenv.lib; { + description = "Python USB access module (wraps libusb 1.0)"; # can use other backends + homepage = http://pyusb.sourceforge.net/; + license = licenses.bsd3; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/raven/default.nix b/pkgs/development/python-modules/raven/default.nix new file mode 100644 index 000000000000..00bc54d844b1 --- /dev/null +++ b/pkgs/development/python-modules/raven/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchurl, isPy3k, contextlib2 }: + +buildPythonPackage rec { + name = "raven-6.3.0"; + + src = fetchurl { + url = "mirror://pypi/r/raven/${name}.tar.gz"; + sha256 = "1wgddbd092vih6k6mknp68vvm1pp12fikjqzglw6mnyw8njnbr7k"; + }; + + # way too many dependencies to run tests + # see https://github.com/getsentry/raven-python/blob/master/setup.py + doCheck = false; + + propagatedBuildInputs = lib.optionals (!isPy3k) [ contextlib2 ]; + + meta = { + description = "A Python client for Sentry (getsentry.com)"; + homepage = https://github.com/getsentry/raven-python; + license = [ lib.licenses.bsd3 ]; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/python-modules/recommonmark/default.nix b/pkgs/development/python-modules/recommonmark/default.nix new file mode 100644 index 000000000000..e03bd3536271 --- /dev/null +++ b/pkgs/development/python-modules/recommonmark/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, sphinx +, CommonMark_54 +, docutils +}: + +buildPythonPackage rec { + pname = "recommonmark"; + name = "${pname}-${version}"; + version = "0.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "6e29c723abcf5533842376d87c4589e62923ecb6002a8e059eb608345ddaff9d"; + }; + + checkInputs = [ pytest sphinx ]; + propagatedBuildInputs = [ CommonMark_54 docutils ]; + + # No tests in archive + doCheck = false; + + meta = { + description = "A docutils-compatibility bridge to CommonMark"; + homepage = https://github.com/rtfd/recommonmark; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/requests_download/default.nix b/pkgs/development/python-modules/requests_download/default.nix new file mode 100644 index 000000000000..4e2646eb6ab2 --- /dev/null +++ b/pkgs/development/python-modules/requests_download/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, requests +}: + +buildPythonPackage rec { + pname = "requests_download"; + version = "0.1.1"; + name = "${pname}-${version}"; + + format = "wheel"; + + #src = pkgs.fetchurl { + # url = https://files.pythonhosted.org/packages/60/af/10f899f0574a81cbc511124c08d7c7dc46c20d4f956a6a3c793ad4330bb4/requests_download-0.1.1-py2.py3-none-any.whl; + # sha256 = "07832a93314bcd619aaeb08611ae245728e66672efb930bc2a300a115a47dab7"; + #}; + + src = fetchPypi { + inherit pname version format; + sha256 = "07832a93314bcd619aaeb08611ae245728e66672efb930bc2a300a115a47dab7"; + }; + + propagatedBuildInputs = [ requests ]; + + meta = { + description = "Download files using requests and save them to a target path"; + homepage = https://www.github.com/takluyver/requests_download; + license = lib.licenses.mit; + maintainer = lib.maintainers.fridh; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/robomachine/default.nix b/pkgs/development/python-modules/robomachine/default.nix new file mode 100644 index 000000000000..1e7b020cd513 --- /dev/null +++ b/pkgs/development/python-modules/robomachine/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, buildPythonPackage, pyparsing, argparse, robotframework }: + +buildPythonPackage rec { + name = "robomachine-0.6"; + + src = fetchurl { + url = "mirror://pypi/R/RoboMachine/RoboMachine-0.6.tar.gz"; + sha256 = "6c9a9bae7bffa272b2a09b05df06c29a3a776542c70cae8041a8975a061d2e54"; + }; + + propagatedBuildInputs = [ pyparsing argparse robotframework ]; + + # Remove Windows .bat files + postInstall = '' + rm "$out/bin/"*.bat + ''; + + postPatch = '' + substituteInPlace setup.py --replace "argparse" "" + ''; + + meta = with stdenv.lib; { + description = "Test data generator for Robot Framework"; + homepage = https://github.com/mkorpela/RoboMachine; + license = licenses.asl20; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/robotframework-ride/default.nix b/pkgs/development/python-modules/robotframework-ride/default.nix new file mode 100644 index 000000000000..a9b536fc76ed --- /dev/null +++ b/pkgs/development/python-modules/robotframework-ride/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, buildPythonPackage, isPy3k, pygments, wxPython }: + +buildPythonPackage rec { + version = "1.2.3"; + name = "robotframework-ride-${version}"; + disabled = isPy3k; + + src = fetchurl { + url = "https://robotframework-ride.googlecode.com/files/${name}.tar.gz"; + sha256 = "1lf5f4x80f7d983bmkx12sxcizzii21kghs8kf63a1mj022a5x5j"; + }; + + propagatedBuildInputs = [ pygments wxPython ]; + + # ride_postinstall.py checks that needed deps are installed and creates a + # desktop shortcut. We don't really need it and it clutters up bin/ so + # remove it. + postInstall = '' + rm -f "$out/bin/ride_postinstall.py" + ''; + + # error: invalid command 'test' + doCheck = false; + + meta = with stdenv.lib; { + description = "Light-weight and intuitive editor for Robot Framework test case files"; + homepage = https://code.google.com/p/robotframework-ride/; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/robotframework/default.nix b/pkgs/development/python-modules/robotframework/default.nix new file mode 100644 index 000000000000..e0a05eb2e258 --- /dev/null +++ b/pkgs/development/python-modules/robotframework/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, buildPythonPackage, isPy3k }: + +buildPythonPackage rec { + version = "3.0.2"; + name = "robotframework-${version}"; + disabled = isPy3k; + + src = fetchurl { + url = "mirror://pypi/r/robotframework/${name}.tar.gz"; + sha256 = "1xqzxv00lxf9xi4vdxdsyd1bfmx18gi96vrnijpzj9w2aqrz4610"; + }; + + meta = with stdenv.lib; { + description = "Generic test automation framework"; + homepage = http://robotframework.org/; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/robotsuite/default.nix b/pkgs/development/python-modules/robotsuite/default.nix new file mode 100644 index 000000000000..2dd672c01097 --- /dev/null +++ b/pkgs/development/python-modules/robotsuite/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi, unittest2, robotframework, lxml }: + +buildPythonPackage rec { + pname = "robotsuite"; + version = "2.0.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "15iw7g6gspf1ill0mzjrj71dirqfc86f1j14wphdvs2lazv8d50z"; + }; + + buildInputs = [ unittest2 ]; + propagatedBuildInputs = [ robotframework lxml ]; + + meta = with stdenv.lib; { + description = "Python unittest test suite for Robot Framework"; + homepage = http://github.com/collective/robotsuite/; + license = licenses.gpl3; + }; +} diff --git a/pkgs/development/python-modules/rply/default.nix b/pkgs/development/python-modules/rply/default.nix new file mode 100644 index 000000000000..912b3fd6ab06 --- /dev/null +++ b/pkgs/development/python-modules/rply/default.nix @@ -0,0 +1,28 @@ +{ stdenv, pytest, fetchFromGitHub, buildPythonPackage, appdirs }: + +buildPythonPackage rec { + pname = "rply"; + name = "${pname}-${version}"; + version = "0.7.5"; + + src = fetchFromGitHub { + owner = "alex"; + repo = "rply"; + rev = "v${version}"; + sha256 = "0v05gdy5dval30wvz96lywvz2jyf000dp0pnrd1lwdx3cyywq659"; + }; + + buildInputs = [ appdirs ]; + + checkInputs = [ pytest ]; + checkPhase = '' + HOME=$(mktemp -d) py.test tests + ''; + + meta = with stdenv.lib; { + description = "A python Lex/Yacc that works with RPython"; + homepage = https://github.com/alex/rply; + license = licenses.bsd3; + maintainers = with maintainers; [ nixy ]; + }; +} diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix new file mode 100644 index 000000000000..5241b632f122 --- /dev/null +++ b/pkgs/development/python-modules/scapy/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, buildPythonPackage, isPy3k, isPyPy }: + +buildPythonPackage rec { + name = "scapy-2.2.0"; + + disabled = isPy3k || isPyPy; + + src = fetchurl { + url = "http://www.secdev.org/projects/scapy/files/${name}.tar.gz"; + sha256 = "1bqmp0xglkndrqgmybpwmzkv462mir8qlkfwsxwbvvzh9li3ndn5"; + }; + + meta = with stdenv.lib; { + description = "Powerful interactive network packet manipulation program"; + homepage = http://www.secdev.org/projects/scapy/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/seaborn/default.nix b/pkgs/development/python-modules/seaborn/default.nix new file mode 100644 index 000000000000..1647e6cfc143 --- /dev/null +++ b/pkgs/development/python-modules/seaborn/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +, pandas +, matplotlib +}: + +buildPythonPackage rec { + pname = "seaborn"; + version = "0.7.1"; + name = "${pname}-${version}"; + src = fetchPypi { + inherit pname version; + sha256 = "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"; + }; + + checkInputs = [ nose ]; + propagatedBuildInputs = [ pandas matplotlib ]; + + checkPhase = '' + nosetests -v + ''; + + # Computationally very demanding tests + doCheck = false; + + meta = { + description = "Statisitical data visualization"; + homepage = "http://stanford.edu/~mwaskom/software/seaborn/"; + license = with lib.licenses; [ bsd3 ]; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/seqdiag/default.nix b/pkgs/development/python-modules/seqdiag/default.nix new file mode 100644 index 000000000000..98a81873a718 --- /dev/null +++ b/pkgs/development/python-modules/seqdiag/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, buildPythonPackage, pep8, nose, unittest2, docutils +, blockdiag +}: + +buildPythonPackage rec { + name = "seqdiag-0.9.4"; + + src = fetchurl { + url = "mirror://pypi/s/seqdiag/${name}.tar.gz"; + sha256 = "1qa7d0m1wahvmrj95rxkb6128cbwd4w3gy8gbzncls66h46bifiz"; + }; + + buildInputs = [ pep8 nose unittest2 docutils ]; + + propagatedBuildInputs = [ blockdiag ]; + + # Tests fail: + # ... + # ERROR: Failure: OSError ([Errno 2] No such file or directory: '/tmp/nix-build-python2.7-seqdiag-0.9.0.drv-0/seqdiag-0.9.0/src/seqdiag/tests/diagrams/') + doCheck = false; + + meta = with stdenv.lib; { + description = "Generate sequence-diagram image from spec-text file (similar to Graphviz)"; + homepage = http://blockdiag.com/; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/tabulate/default.nix b/pkgs/development/python-modules/tabulate/default.nix new file mode 100644 index 000000000000..9ddc2a0e08b3 --- /dev/null +++ b/pkgs/development/python-modules/tabulate/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +}: + +buildPythonPackage rec { + version = "0.7.7"; + pname = "tabulate"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "83a0b8e17c09f012090a50e1e97ae897300a72b35e0c86c0b53d3bd2ae86d8c6"; + }; + + checkInputs = [ nose ]; + + # Tests: cannot import common (relative import). + doCheck = false; + + meta = { + description = "Pretty-print tabular data"; + homepage = https://bitbucket.org/astanin/python-tabulate; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/toolz/default.nix b/pkgs/development/python-modules/toolz/default.nix new file mode 100644 index 000000000000..36b85bce3acd --- /dev/null +++ b/pkgs/development/python-modules/toolz/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +}: + +buildPythonPackage rec{ + pname = "toolz"; + version = "0.8.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0l3czks4xy37i8099waxk2fdz5g0k1dwys2mkhlxc0b0886cj4sa"; + }; + + checkInputs = [ nose ]; + + checkPhase = '' + # https://github.com/pytoolz/toolz/issues/357 + rm toolz/tests/test_serialization.py + nosetests toolz/tests + ''; + + meta = { + homepage = "http://github.com/pytoolz/toolz/"; + description = "List processing tools and functional utilities"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/traitlets/default.nix b/pkgs/development/python-modules/traitlets/default.nix new file mode 100644 index 000000000000..c34bb09b794c --- /dev/null +++ b/pkgs/development/python-modules/traitlets/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchPypi +, glibcLocales +, pytest +, mock +, ipython_genutils +, decorator +, enum34 +}: + +buildPythonPackage rec { + pname = "traitlets"; + version = "4.3.2"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "9c4bd2d267b7153df9152698efb1050a5d84982d3384a37b2c1f7723ba3e7835"; + }; + + checkInputs = [ glibcLocales pytest mock ]; + propagatedBuildInputs = [ ipython_genutils decorator enum34 ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" py.test $out + ''; + + meta = { + description = "Traitlets Python config system"; + homepage = http://ipython.org/; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/urwid/default.nix b/pkgs/development/python-modules/urwid/default.nix new file mode 100644 index 000000000000..129f4821e875 --- /dev/null +++ b/pkgs/development/python-modules/urwid/default.nix @@ -0,0 +1,20 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage (rec { + pname = "urwid"; + version = "1.3.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"; + }; + + meta = with stdenv.lib; { + description = "A full-featured console (xterm et al.) user interface library"; + homepage = http://excess.org/urwid; + repositories.git = git://github.com/wardi/urwid.git; + license = licenses.lgpl21; + maintainers = with maintainers; [ garbas ]; + }; +}) diff --git a/pkgs/development/python-modules/usbtmc/default.nix b/pkgs/development/python-modules/usbtmc/default.nix new file mode 100644 index 000000000000..0c6842749073 --- /dev/null +++ b/pkgs/development/python-modules/usbtmc/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, buildPythonPackage, pyusb }: + +buildPythonPackage rec { + name = "usbtmc-${version}"; + version = "0.8"; + + src = fetchurl { + url = "https://github.com/python-ivi/python-usbtmc/archive/v${version}.tar.gz"; + sha256 = "14f4j77ljr45crnjwlp1dqbxwa45s20y2fpq5rg59r60w15al4yw"; + }; + + propagatedBuildInputs = [ pyusb ]; + + meta = with stdenv.lib; { + description = "Python implementation of the USBTMC instrument control protocol"; + homepage = http://alexforencich.com/wiki/en/python-usbtmc/start; + license = licenses.mit; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/development/python-modules/zipfile36/default.nix b/pkgs/development/python-modules/zipfile36/default.nix new file mode 100644 index 000000000000..0915eb002b79 --- /dev/null +++ b/pkgs/development/python-modules/zipfile36/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, isPy3k +, pythonOlder +}: + +buildPythonPackage rec { + pname = "zipfile36"; + version = "0.1.3"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "a78a8dddf4fa114f7fe73df76ffcce7538e23433b7a6a96c1c904023f122aead"; + }; + + checkPhase = '' + ${python.interpreter} -m unittest test_zipfile.py + ''; + + # Only works with Python 3.x. + # Not supposed to be used with 3.6 and up. + disabled = !(isPy3k && (pythonOlder "3.6")); + + meta = { + description = "Read and write ZIP files - backport of the zipfile module from Python 3.6"; + homepage = https://gitlab.com/takluyver/zipfile36; + license = lib.licenses.psfl; + maintainer = lib.maintainers.fridh; + }; +} \ No newline at end of file diff --git a/pkgs/development/python-modules/zipstream/default.nix b/pkgs/development/python-modules/zipstream/default.nix new file mode 100644 index 000000000000..aac2bceeb15d --- /dev/null +++ b/pkgs/development/python-modules/zipstream/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchurl, nose }: + +let + pname = "zipstream"; + version = "1.1.4"; +in buildPythonPackage rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://pypi/z/${pname}/${name}.tar.gz"; + sha256 = "01im5anqdyggmwkigqcjg0qw2a5bnn84h33mfaqjjd69a28lpwif"; + }; + + buildInputs = [ nose ]; + + meta = { + description = "A zip archive generator"; + homepage = https://github.com/allanlei/python-zipstream; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch b/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch new file mode 100644 index 000000000000..b6bcedea91a8 --- /dev/null +++ b/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch @@ -0,0 +1,29 @@ +Tests are kind of broken in ZODB-5.3.0. Fix setup code and disable one +especially problematic test. + +diff -u ZODB-5.3.0/setup.py ZODB-5.3.0/setup.py +--- ZODB-5.3.0/setup.py 2017-08-30 14:55:10.000000000 +0200 ++++ ZODB-5.3.0/setup.py 2017-10-29 11:34:17.277953730 +0100 +@@ -85,7 +85,10 @@ + mod = __import__( + _modname(dirpath, base, os.path.splitext(filename)[0]), + {}, {}, ['*']) +- _unittests_only(suite, mod.test_suite()) ++ try: ++ _unittests_only(suite, mod.test_suite()) ++ except AttributeError: ++ pass + elif 'tests.py' in filenames: + mod = __import__(_modname(dirpath, base, 'tests'), {}, {}, ['*']) + _unittests_only(suite, mod.test_suite()) +diff -u ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py +--- ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py 2017-08-30 14:55:10.000000000 +0200 ++++ ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py 2017-10-29 11:35:10.348240386 +0100 +@@ -1184,7 +1184,4 @@ + #unittest.makeSuite(Test_do_backup), #TODO + unittest.makeSuite(Test_do_recover), + unittest.makeSuite(Test_do_verify), +- # N.B.: this test take forever to run (~40sec on a fast laptop), +- # *and* it is non-deterministic. +- unittest.makeSuite(MonteCarloTests), + ]) diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix index 5a318b5d040b..232acaec506c 100644 --- a/pkgs/development/python-modules/zodb/default.nix +++ b/pkgs/development/python-modules/zodb/default.nix @@ -25,6 +25,10 @@ buildPythonPackage rec { sha256 = "633c2f89481d8ebc55639b59216f7d16d07b44a94758850c0b887006967214f3"; }; + patches = [ + ./ZODB-5.3.0-fix-tests.patch + ]; + propagatedBuildInputs = [ manuel transaction |