diff --git a/pkgs/development/python-modules/futures/default.nix b/pkgs/development/python-modules/futures/default.nix new file mode 100644 index 00000000000..c4a39c39c33 --- /dev/null +++ b/pkgs/development/python-modules/futures/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, python }: + +buildPythonPackage rec { + pname = "futures"; + version = "3.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1z9j05fdj2yszjmz4pmjhl2jdnwhdw80cjwfqq3ci0yx19gv9v2i"; + }; + + # This module is for backporting functionality to Python 2.x, it's builtin in py3k + disabled = isPy3k; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + # Tests fail + doCheck = false; + + meta = with lib; { + description = "Backport of the concurrent.futures package from Python 3.2"; + homepage = "https://github.com/agronholm/pythonfutures"; + license = licenses.bsd2; + maintainers = with maintainers; [ garbas ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0074f05d433..6c563ccee4a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5950,32 +5950,7 @@ in { }; }); - futures = buildPythonPackage rec { - name = "futures-${version}"; - version = "3.1.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/futures/${name}.tar.gz"; - sha256 = "1z9j05fdj2yszjmz4pmjhl2jdnwhdw80cjwfqq3ci0yx19gv9v2i"; - }; - - # This module is for backporting functionality to Python 2.x, it's builtin in py3k - disabled = isPy3k; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - - # Tests fail - doCheck = false; - - meta = with pkgs.stdenv.lib; { - description = "Backport of the concurrent.futures package from Python 3.2"; - homepage = "https://github.com/agronholm/pythonfutures"; - license = licenses.bsd2; - maintainers = with maintainers; [ garbas ]; - }; - }; + futures = callPackage ../development/python-modules/futures { }; futures_2_2 = self.futures.override rec { version = "2.2.0";