From 1856119466211694ff15e20a8472ca68c4a3c4a6 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Wed, 28 Jun 2017 04:42:13 -0400 Subject: [PATCH] python-gflags: 2.0 -> 3.1.1 (#26858) * python-gflags: 2.0 -> 3.1.1 * python-gflags: split out to new python-modules dir * python-gflags: fix tests --- .../python-modules/gflags/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 14 +--------- 2 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/python-modules/gflags/default.nix diff --git a/pkgs/development/python-modules/gflags/default.nix b/pkgs/development/python-modules/gflags/default.nix new file mode 100644 index 000000000000..48fff7230569 --- /dev/null +++ b/pkgs/development/python-modules/gflags/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchPypi, six, pytest }: + +buildPythonPackage rec { + version = "3.1.1"; + name = "gflags-${version}"; + + src = fetchPypi { + inherit version; + pname = "python-gflags"; + sha256 = "0qvcizlz6r4511kl4jlg6fr34y1ka956dr2jj1q0qcklr94n9zxa"; + }; + + buildInputs = [ pytest ]; + + propagatedBuildInputs = [ six ]; + + checkPhase = '' + # clashes with our pythhon wrapper (which is in argv0) + # AssertionError: 'gflags._helpers_test' != 'nix_run_setup.py' + py.test -k 'not testGetCallingModule' + ''; + + meta = { + homepage = https://github.com/google/python-gflags; + description = "A module for command line handling, similar to Google's gflags for C++"; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b72a0974311..f69ea599c770 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11609,19 +11609,7 @@ in { }; - gflags = buildPythonPackage rec { - name = "gflags-2.0"; - - src = pkgs.fetchurl { - url = "http://python-gflags.googlecode.com/files/python-${name}.tar.gz"; - sha256 = "1mkc7315bpmh39vbn0jq237jpw34zsrjr1sck98xi36bg8hnc41i"; - }; - - meta = { - homepage = http://code.google.com/p/python-gflags/; - description = "A module for command line handling, similar to Google's gflags for C++"; - }; - }; + gflags = callPackage ../development/python-modules/gflags { }; ghdiff = callPackage ../development/python-modules/ghdiff.nix { };