From 49a313c395006ede63850f42c3887d2e1446b43a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 1 Dec 2016 12:32:39 +0100 Subject: pythonpackages.lti: rename to PyLTI and remove overriding - rename to PyLTI to follow upstream - remove overriding because it is not necessary; newer mock can be used, and modules python packages should be fixed to not propagate pytest (see separate commit). cc maintainer @layus --- pkgs/servers/inginious/default.nix | 2 +- pkgs/top-level/python-packages.nix | 21 ++++++++------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/inginious/default.nix b/pkgs/servers/inginious/default.nix index c85d96100c3c..113b297787b3 100644 --- a/pkgs/servers/inginious/default.nix +++ b/pkgs/servers/inginious/default.nix @@ -38,7 +38,7 @@ in pythonPackages.buildPythonApplication rec { propagatedBuildInputs = with pythonPackages; [ requests2 - cgroup-utils docker_1_7_2 docutils lti mock pygments + cgroup-utils docker_1_7_2 docutils PyLTI mock pygments pymongo pyyaml rpyc sh simpleldap sphinx_rtd_theme tidylib websocket_client watchdog webpy-custom flup ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9044288bad64..201c34f3a9a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7981,26 +7981,21 @@ in { }; }; - lti = let - self' = (self.override {self = self';}) // {pytest = self.pytest_27;}; - mock_1_0_1 = self'.mock.overrideDerivation (_: rec { - name = "mock-1.0.1"; - propagatedBuildInputs = null; - src = pkgs.fetchurl { - url = "http://pypi.python.org/packages/source/m/mock/${name}.tar.gz"; - sha256 = "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"; - }; - }); - in buildPythonPackage rec { + PyLTI = buildPythonPackage rec { version = "0.4.1"; name = "PyLTI-${version}"; disabled = !isPy27; + # There is no need to fix mock. https://github.com/mitodl/pylti/pull/48 + postPatch = '' + substituteInPlace setup.py --replace "mock==1.0.1" "mock" + ''; + propagatedBuildInputs = with self; [ httplib2 oauth oauth2 semantic-version ]; - buildInputs = with self'; [ + buildInputs = with self; [ flask httpretty oauthlib pyflakes pytest pytestcache pytestcov covCore - pytestflakes pytestpep8 sphinx mock_1_0_1 + pytestflakes pytestpep8 sphinx mock ]; src = pkgs.fetchurl { -- cgit 1.4.1