From 408f6b2843b44109d09f3ad2787fc49c75d99776 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 16 Mar 2018 01:14:12 +0800 Subject: [PATCH] pythonPackages.pycurl: Move to separate file --- .../python-modules/pycurl/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 29 +------------- 2 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 pkgs/development/python-modules/pycurl/default.nix diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix new file mode 100644 index 00000000000..e1d9158a4f7 --- /dev/null +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage +, isPyPy +, fetchPypi +, curl +, openssl +, bottle +, pytest +, nose +, flaky +}: + +buildPythonPackage rec { + pname = "pycurl"; + version = "7.43.0.1"; + disabled = isPyPy; # https://github.com/pycurl/pycurl/issues/208 + + src = fetchPypi { + inherit pname version; + sha256 = "1ali1gjs9iliwjra7w0y5hwg79a2fd0f4ydvv6k27sgxpbr1n8s3"; + }; + + buildInputs = [ curl openssl.out ]; + + checkInputs = [ bottle pytest nose flaky ]; + + checkPhase = '' + py.test -k "not test_ssl_in_static_libs and not ssh_key_cb_test" tests + ''; + + preConfigure = '' + substituteInPlace setup.py --replace '--static-libs' '--libs' + export PYCURL_SSL_LIBRARY=openssl + ''; + + meta = { + homepage = http://pycurl.sourceforge.net/; + description = "Python wrapper for libcurl"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c6dc0e18cba..305de7c0266 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12943,34 +12943,7 @@ in { }; - pycurl = buildPythonPackage (rec { - pname = "pycurl"; - version = "7.43.0.1"; - disabled = isPyPy; # https://github.com/pycurl/pycurl/issues/208 - - src = fetchPypi { - inherit pname version; - sha256 = "1ali1gjs9iliwjra7w0y5hwg79a2fd0f4ydvv6k27sgxpbr1n8s3"; - }; - - buildInputs = with self; [ pkgs.curl pkgs.openssl.out ]; - - checkInputs = with self; [ bottle pytest nose flaky ]; - - checkPhase = '' - py.test -k "not test_ssl_in_static_libs and not ssh_key_cb_test" tests - ''; - - preConfigure = '' - substituteInPlace setup.py --replace '--static-libs' '--libs' - export PYCURL_SSL_LIBRARY=openssl - ''; - - meta = { - homepage = http://pycurl.sourceforge.net/; - description = "Python wrapper for libcurl"; - }; - }); + pycurl = callPackage ../development/python-modules/pycurl { }; pycurl2 = buildPythonPackage (rec { name = "pycurl2-7.20.0";