diff options
Diffstat (limited to 'pkgs/development/python-modules')
19 files changed, 383 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/cairocffi/default.nix b/pkgs/development/python-modules/cairocffi/default.nix new file mode 100644 index 000000000000..a8a8ac110f10 --- /dev/null +++ b/pkgs/development/python-modules/cairocffi/default.nix @@ -0,0 +1,58 @@ +# FIXME: make gdk_pixbuf dependency optional +{ buildPythonPackage +, fetchPypi +, lib +, substituteAll +, makeFontsConf +, freefont_ttf +, pytest +, glibcLocales +, cairo +, cffi +, withXcffib ? false, xcffib +, python +, glib +, gdk_pixbuf }: + +buildPythonPackage rec { + pname = "cairocffi"; + version = "0.8.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0i9m3p39g9wrkpjvpawch2qmnmm3cnim7niz3nmmbcp2hrkixwk5"; + }; + + LC_ALL = "en_US.UTF-8"; + + # checkPhase require at least one 'normal' font and one 'monospace', + # otherwise glyph tests fails + FONTCONFIG_FILE = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; + + checkInputs = [ pytest glibcLocales ]; + propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; + + checkPhase = '' + py.test $out/${python.sitePackages} + ''; + + patches = [ + # OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0 + (substituteAll { + src = ./dlopen-paths.patch; + cairo = cairo.out; + glib = glib.out; + gdk_pixbuf = gdk_pixbuf.out; + }) + ./fix_test_scaled_font.patch + ]; + + meta = with lib; { + homepage = https://github.com/SimonSapin/cairocffi; + license = licenses.bsd3; + maintainers = with maintainers; []; + description = "cffi-based cairo bindings for Python"; + }; +} diff --git a/pkgs/development/python-modules/cement/default.nix b/pkgs/development/python-modules/cement/default.nix index 3fbdb500af80..36cc20e027bb 100644 --- a/pkgs/development/python-modules/cement/default.nix +++ b/pkgs/development/python-modules/cement/default.nix @@ -2,7 +2,6 @@ buildPythonPackage rec { pname = "cement"; - name = "${pname}-${version}"; version = "2.10.2"; src = fetchPypi { diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix new file mode 100644 index 000000000000..5ffa51def0d2 --- /dev/null +++ b/pkgs/development/python-modules/cmd2/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchPypi, buildPythonPackage, pythonOlder +, pyperclip, six, pyparsing, vim +, contextlib2 ? null, subprocess32 ? null +, pytest, mock, which, fetchFromGitHub, glibcLocales +}: +buildPythonPackage rec { + pname = "cmd2"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "python-cmd2"; + repo = "cmd2"; + rev = version; + sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z"; + }; + + LC_ALL="en_US.UTF-8"; + + postPatch = stdenv.lib.optional stdenv.isDarwin '' + # Fake the impure dependencies pbpaste and pbcopy + mkdir bin + echo '#/bin/sh' > bin/pbpaste + echo '#/bin/sh' > bin/pbcopy + chmod +x bin/{pbcopy,pbpaste} + export PATH=$(realpath bin):$PATH + ''; + + checkInputs= [ pytest mock which vim glibcLocales ]; + checkPhase = '' + # test_path_completion_user_expansion might be fixed in the next release + py.test -k 'not test_path_completion_user_expansion' + ''; + doCheck = !stdenv.isDarwin; + + propagatedBuildInputs = [ + pyperclip + six + pyparsing + ] + ++ stdenv.lib.optional (pythonOlder "3.5") contextlib2 + ++ stdenv.lib.optional (pythonOlder "3.0") subprocess32 + ; + + meta = with stdenv.lib; { + description = "Enhancements for standard library's cmd module"; + homepage = https://github.com/python-cmd2/cmd2; + maintainers = with maintainers; [ teto ]; + }; +} diff --git a/pkgs/development/python-modules/colorama/default.nix b/pkgs/development/python-modules/colorama/default.nix index 99a59ae8fd43..bce14db7704f 100644 --- a/pkgs/development/python-modules/colorama/default.nix +++ b/pkgs/development/python-modules/colorama/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchPypi, buildPythonPackage }: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "colorama"; version = "0.3.9"; diff --git a/pkgs/development/python-modules/d2to1/default.nix b/pkgs/development/python-modules/d2to1/default.nix new file mode 100644 index 000000000000..195b20c27e4f --- /dev/null +++ b/pkgs/development/python-modules/d2to1/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchFromGitHub +, nose +}: +buildPythonPackage rec { + pname = "d2to1"; + version = "0.2.12"; + + checkInputs = [ nose ]; + + src = fetchFromGitHub { + owner = "embray"; + repo = pname; + rev = version; + sha256 = "1q04ab8vjvx7fmq9ckkl8r9hlwwbqiyjbzaa4v1mv5zicfssxwsi"; + }; + + meta = with lib;{ + description = "Support for distutils2-like setup.cfg files as package metadata"; + homepage = https://github.com/embray/d2to1; + license = licenses.bsd2; + maintainers = with maintainers; [ makefu ]; + }; +} diff --git a/pkgs/development/python-modules/docker/default.nix b/pkgs/development/python-modules/docker/default.nix index 4ce013ac7976..bb39ccd7cf6e 100644 --- a/pkgs/development/python-modules/docker/default.nix +++ b/pkgs/development/python-modules/docker/default.nix @@ -1,14 +1,13 @@ -{ stdenv, buildPythonPackage, fetchurl +{ stdenv, buildPythonPackage, fetchPypi , six, requests, websocket_client , ipaddress, backports_ssl_match_hostname, docker_pycreds }: buildPythonPackage rec { version = "2.7.0"; pname = "docker"; - name = "${pname}-${version}"; - src = fetchurl { - url = "mirror://pypi/d/docker/${name}.tar.gz"; + src = fetchPypi { + inherit pname version; sha256 = "144248308e8ea31c4863c6d74e1b55daf97cc190b61d0fe7b7313ab920d6a76c"; }; diff --git a/pkgs/development/python-modules/kubernetes/default.nix b/pkgs/development/python-modules/kubernetes/default.nix new file mode 100644 index 000000000000..5566eea64eb8 --- /dev/null +++ b/pkgs/development/python-modules/kubernetes/default.nix @@ -0,0 +1,38 @@ +{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast, + ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google_auth, + isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }: + +buildPythonPackage rec { + pname = "kubernetes"; + version = "5.0.0"; + + prePatch = '' + sed -e 's/sphinx>=1.2.1,!=1.3b1,<1.4 # BSD/sphinx/' -i test-requirements.txt + + # This is used to randomize tests, which is not reproducible. Drop it. + sed -e '/randomize/d' -i test-requirements.txt + '' + # This is a python2 and python3.2 only requiremet since it is a backport of a python-3.3 api. + + (if (pythonAtLeast "3.3") then '' + sed -e '/ipaddress/d' -i requirements.txt + '' else ""); + + checkPhase = '' + py.test + ''; + + src = fetchPypi { + inherit pname version; + sha256 = "1z8rrlq73bzli9rg57kj8ivz09vhsydyjq1ksbcis6j7h9c187zq"; + }; + + checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ]; + propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google_auth ]; + + meta = with stdenv.lib; { + description = "Kubernetes python client"; + homepage = https://github.com/kubernetes-client/python; + license = licenses.asl20; + maintainers = with maintainers; [ lsix ]; + }; +} diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 0ed51d7acecf..da7ddbc7dcb7 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -5,12 +5,12 @@ , requests, tox, unicorn, intervaltree, fetchpatch }: buildPythonPackage rec { - version = "3.11.0"; + version = "3.12.0"; pname = "pwntools"; src = fetchPypi { inherit pname version; - sha256 = "609b3f0ba47c975f4dbedd3da2af4c5ca1b3a2aa13fb99240531b6a68edb87be"; + sha256 = "09a7yhsyqxb4xf2r6mbn3p5zx1wp89lxq7lj34y4zbin6ns5929s"; }; propagatedBuildInputs = [ Mako packaging pysocks pygments ROPGadget capstone paramiko pip psutil pyelftools pyserial dateutil requests tox unicorn intervaltree ]; @@ -18,10 +18,10 @@ buildPythonPackage rec { disabled = isPy3k; doCheck = false; # no setuptools tests for the package - # Can be removed when 3.12.0 is released + # Can be removed when 3.13.0 is released patches = [ (fetchpatch { - url = "https://github.com/Gallopsled/pwntools/pull/1098.patch"; + url = "https://github.com/Gallopsled/pwntools/commit/9859f54a21404174dd17efee02f91521a2dd09c5.patch"; sha256 = "0p0h87npn1mwsd8ciab7lg74bk3ahlk5r0mjbvx4jhihl2gjc3z2"; }) ]; diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix index f3ff4a84f1e8..aeca2abf17cf 100644 --- a/pkgs/development/python-modules/requests/default.nix +++ b/pkgs/development/python-modules/requests/default.nix @@ -3,7 +3,6 @@ , pytest }: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "requests"; version = "2.18.4"; diff --git a/pkgs/development/python-modules/semantic-version/default.nix b/pkgs/development/python-modules/semantic-version/default.nix index f9e04691c1cb..e3c92a0e40fc 100644 --- a/pkgs/development/python-modules/semantic-version/default.nix +++ b/pkgs/development/python-modules/semantic-version/default.nix @@ -3,7 +3,6 @@ buildPythonPackage rec { pname = "semantic_version"; version = "2.6.0"; - name = "${pname}${version}"; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/tabulate/default.nix b/pkgs/development/python-modules/tabulate/default.nix index db7f43c1ea46..b238d58f68d3 100644 --- a/pkgs/development/python-modules/tabulate/default.nix +++ b/pkgs/development/python-modules/tabulate/default.nix @@ -7,7 +7,6 @@ buildPythonPackage rec { version = "0.8.2"; pname = "tabulate"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; @@ -25,4 +24,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ fridh ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/websockets_client/default.nix b/pkgs/development/python-modules/websockets_client/default.nix new file mode 100644 index 000000000000..dd6e9200db52 --- /dev/null +++ b/pkgs/development/python-modules/websockets_client/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, six }: +buildPythonPackage rec { + pname = "websocket_client"; + version = "0.47.0"; + + src = fetchPypi { + inherit version pname; + sha256 = "0jb1446053ryp5p25wsr1hjfdzwfm04a6f3pzpcb63bfz96xqlx4"; + }; + + prePatch = '' + # ssl.match_hostname exists in python2.7 version maintained in nixpkgs, + # the dependency is not necessary. + sed -e "s/\['backports.ssl_match_hostname'\]/\[\]/" -i setup.py + ''; + + propagatedBuildInputs = [ six ]; + + meta = with stdenv.lib; { + homepage = https://github.com/liris/websocket-client; + description = "Websocket client for python"; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/development/python-modules/xstatic-bootbox/default.nix b/pkgs/development/python-modules/xstatic-bootbox/default.nix new file mode 100644 index 000000000000..68c81157eb08 --- /dev/null +++ b/pkgs/development/python-modules/xstatic-bootbox/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchPypi +}: + +buildPythonPackage rec { + pname = "XStatic-Bootbox"; + version = "4.3.0.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "0wks1lsqngn3gvlhzrvaan1zj8w4wr58xi0pfqhrzckbghvvr0gj"; + }; + + # no tests implemented + doCheck = false; + + meta = with lib;{ + homepage = http://bootboxjs.com; + description = "Bootboxjs packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic-bootstrap/default.nix b/pkgs/development/python-modules/xstatic-bootstrap/default.nix new file mode 100644 index 000000000000..757c2cc240ed --- /dev/null +++ b/pkgs/development/python-modules/xstatic-bootstrap/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchPypi +}: + +buildPythonPackage rec { + pname = "XStatic-Bootstrap"; + version = "3.3.5.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "0jzjq3d4vp2shd2n20f9y53jnnk1cvphkj1v0awgrf18qsy2bmin"; + }; + + # no tests implemented + doCheck = false; + + meta = with lib;{ + homepage = http://getbootstrap.com; + description = "Bootstrap packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic-jquery-file-upload/default.nix b/pkgs/development/python-modules/xstatic-jquery-file-upload/default.nix new file mode 100644 index 000000000000..0cf029c68a59 --- /dev/null +++ b/pkgs/development/python-modules/xstatic-jquery-file-upload/default.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage +, lib +, fetchPypi +, xstatic-jquery +}: + +buildPythonPackage rec { + pname = "XStatic-jQuery-File-Upload"; + version = "9.7.0.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "0d5za18lhzhb54baxq8z73wazq801n3qfj5vgcz7ri3ngx7nb0cg"; + }; + + # no tests implemented + doCheck = false; + + propagatedBuildInputs = [ xstatic-jquery ]; + + meta = with lib;{ + homepage = http://plugins.jquery.com/project/jQuery-File-Upload; + description = "jquery-file-upload packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic-jquery-ui/default.nix b/pkgs/development/python-modules/xstatic-jquery-ui/default.nix new file mode 100644 index 000000000000..1b884a97eb22 --- /dev/null +++ b/pkgs/development/python-modules/xstatic-jquery-ui/default.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage +, lib +, fetchPypi +, xstatic-jquery +}: + +buildPythonPackage rec { + pname = "XStatic-jquery-ui"; + version = "1.12.0.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "0w7mabv6qflpd47g33j3ggp5rv17mqk0xz3bsdswcj97wqpga2l2"; + }; + + # no tests implemented + doCheck = false; + + propagatedBuildInputs = [ xstatic-jquery ]; + + meta = with lib;{ + homepage = http://jqueryui.com/; + description = "jquery-ui packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic-jquery/default.nix b/pkgs/development/python-modules/xstatic-jquery/default.nix new file mode 100644 index 000000000000..c414e0a070ae --- /dev/null +++ b/pkgs/development/python-modules/xstatic-jquery/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchPypi +}: + +buildPythonPackage rec { + pname = "XStatic-jQuery"; + version = "1.10.2.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "018kx4zijflcq8081xx6kmiqf748bsjdq7adij2k91bfp1mnlhc3"; + }; + + # no tests implemented + doCheck = false; + + meta = with lib;{ + homepage = http://jquery.org; + description = "jquery packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic-pygments/default.nix b/pkgs/development/python-modules/xstatic-pygments/default.nix new file mode 100644 index 000000000000..8ec9b77860c2 --- /dev/null +++ b/pkgs/development/python-modules/xstatic-pygments/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchPypi +}: + +buildPythonPackage rec { + pname = "XStatic-Pygments"; + version = "1.6.0.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "0fjqgg433wfdnswn7fad1g6k2x6mf24wfnay2j82j0fwgkdxrr7m"; + }; + + # no tests implemented + doCheck = false; + + meta = with lib;{ + homepage = http://pygments.org; + description = "pygments packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} diff --git a/pkgs/development/python-modules/xstatic/default.nix b/pkgs/development/python-modules/xstatic/default.nix new file mode 100644 index 000000000000..02931215b8d3 --- /dev/null +++ b/pkgs/development/python-modules/xstatic/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage +, lib +, fetchPypi +}: + +buildPythonPackage rec { + pname = "XStatic"; + version = "1.0.1"; + + src = fetchPypi { + inherit version pname; + sha256 = "09npcsyf1ccygjs0qc8kdsv4qqy8gm1m6iv63g9y1fgbcry3vj8f"; + }; + + # no tests implemented + doCheck = false; + + meta = with lib;{ + homepage = https://bitbucket.org/thomaswaldmann/xstatic; + description = "Base packaged static files for python"; + license = licenses.mit; + maintainers = with maintainers; [ makefu ]; + }; + +} |