pytrainer: fix tests

This commit is contained in:
Robert Schütz 2018-02-22 00:12:44 +01:00
parent 882cf122be
commit da31b47790

View File

@ -1,19 +1,19 @@
{ stdenv, fetchFromGitHub, perl, python2Packages, sqlite, gpsbabel { stdenv, fetchFromGitHub, perl, python, sqlite, gpsbabel
, withWebKit ? false }: , withWebKit ? false }:
let let
# Pytrainer needs a matplotlib with GTK backend. Also ensure we are # Pytrainer needs a matplotlib with GTK backend. Also ensure we are
# using the pygtk with glade support as needed by pytrainer. # using the pygtk with glade support as needed by pytrainer.
matplotlibGtk = python2Packages.matplotlib.override { matplotlibGtk = python.pkgs.matplotlib.override {
enableGtk2 = true; enableGtk2 = true;
pygtk = python2Packages.pyGtkGlade; pygtk = python.pkgs.pyGtkGlade;
}; };
in in
python2Packages.buildPythonApplication rec { python.pkgs.buildPythonApplication rec {
name = "pytrainer-${version}"; pname = "pytrainer";
version = "1.11.0"; version = "1.11.0";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -35,7 +35,7 @@ python2Packages.buildPythonApplication rec {
./pytrainer-webkit.patch ./pytrainer-webkit.patch
]; ];
propagatedBuildInputs = with python2Packages; [ propagatedBuildInputs = with python.pkgs; [
dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate
] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ]; ] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ];
@ -45,6 +45,10 @@ python2Packages.buildPythonApplication rec {
dontPatchELF = true; dontPatchELF = true;
dontStrip = true; dontStrip = true;
checkPhase = ''
${python.interpreter} -m unittest discover
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/pytrainer/pytrainer/wiki; homepage = https://github.com/pytrainer/pytrainer/wiki;
description = "Application for logging and graphing sporting excursions"; description = "Application for logging and graphing sporting excursions";