tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pytrainer: 1.11.0 -> 1.12.0
Robert Helgesson
8 years ago
e21057ae
6d54123c
+28
-14
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
pytrainer
default.nix
fix-test-tz.patch
+8
-3
pkgs/applications/misc/pytrainer/default.nix
···
14
14
15
15
python2Packages.buildPythonApplication rec {
16
16
name = "pytrainer-${version}";
17
17
-
version = "1.11.0";
17
17
+
version = "1.12.0";
18
18
19
19
src = fetchFromGitHub {
20
20
owner = "pytrainer";
21
21
repo = "pytrainer";
22
22
rev = "v${version}";
23
23
-
sha256 = "1x4f1ydjql0aisvxs5kyi9lx35b4q3768dx42fyzq1nxdwzaqyvy";
23
23
+
sha256 = "09pfddjaqdpy3r27h21xvsvh04sb8hppinskxlahdqb3vjzkr581";
24
24
};
25
25
26
26
namePrefix = "";
···
35
35
./pytrainer-webkit.patch
36
36
];
37
37
38
38
+
postPatch = ''
39
39
+
substituteInPlace ./setup.py \
40
40
+
--replace "'mysqlclient'," ""
41
41
+
'';
42
42
+
38
43
propagatedBuildInputs = with python2Packages; [
39
39
-
dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate
44
44
+
dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy sqlalchemy_migrate psycopg2
40
45
] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ];
41
46
42
47
buildInputs = [ perl gpsbabel sqlite ];
+20
-11
pkgs/applications/misc/pytrainer/fix-test-tz.patch
···
1
1
-
diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/core/test_activity.py pytrainer-v1.11.0-b/pytrainer/test/core/test_activity.py
2
2
-
--- pytrainer-v1.11.0-a/pytrainer/test/core/test_activity.py 1980-01-02 00:00:00.000000000 +0100
3
3
-
+++ pytrainer-v1.11.0-b/pytrainer/test/core/test_activity.py 2017-09-30 18:56:43.127016847 +0200
4
4
-
@@ -69,7 +69,7 @@ class ActivityTest(unittest.TestCase):
1
1
+
diff -Nurp source.orig/pytrainer/test/core/test_activity.py source/pytrainer/test/core/test_activity.py
2
2
+
--- source.orig/pytrainer/test/core/test_activity.py 2018-02-27 22:15:32.078243354 +0100
3
3
+
+++ source/pytrainer/test/core/test_activity.py 2018-02-27 22:16:33.936867052 +0100
4
4
+
@@ -92,7 +92,7 @@ class ActivityTest(unittest.TestCase):
5
5
self.assertEquals(self.activity.time, self.activity.duration)
6
6
7
7
def test_activity_starttime(self):
···
10
10
11
11
def test_activity_time_tuple(self):
12
12
self.assertEquals(self.activity.time_tuple, (2, 3, 46))
13
13
-
diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/imports/test_garmintcxv2.py pytrainer-v1.11.0-b/pytrainer/test/imports/test_garmintcxv2.py
14
14
-
--- pytrainer-v1.11.0-a/pytrainer/test/imports/test_garmintcxv2.py 1980-01-02 00:00:00.000000000 +0100
15
15
-
+++ pytrainer-v1.11.0-b/pytrainer/test/imports/test_garmintcxv2.py 2017-09-30 18:55:45.078128980 +0200
16
16
-
@@ -23,7 +23,7 @@ class GarminTCXv2Test(unittest.TestCase)
13
13
+
diff -Nurp source.orig/pytrainer/test/imports/test_garmintcxv2.py source/pytrainer/test/imports/test_garmintcxv2.py
14
14
+
--- source.orig/pytrainer/test/imports/test_garmintcxv2.py 2018-02-27 22:15:32.079243364 +0100
15
15
+
+++ source/pytrainer/test/imports/test_garmintcxv2.py 2018-02-27 22:17:10.778333751 +0100
16
16
+
@@ -39,7 +39,7 @@ class GarminTCXv2Test(unittest.TestCase)
17
17
self.fail()
18
18
19
19
def test_workout_summary(self):
···
22
22
try:
23
23
current_path = os.path.dirname(os.path.abspath(__file__))
24
24
data_path = os.path.dirname(os.path.dirname(os.path.dirname(current_path))) + "/"
25
25
-
diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/lib/test_date.py pytrainer-v1.11.0-b/pytrainer/test/lib/test_date.py
26
26
-
--- pytrainer-v1.11.0-a/pytrainer/test/lib/test_date.py 1980-01-02 00:00:00.000000000 +0100
27
27
-
+++ pytrainer-v1.11.0-b/pytrainer/test/lib/test_date.py 2017-09-30 18:56:23.448720166 +0200
25
25
+
@@ -52,7 +52,7 @@ class GarminTCXv2Test(unittest.TestCase)
26
26
+
self.fail()
27
27
+
28
28
+
def test_summary_in_database(self):
29
29
+
- summary = [(0, True, '2012-10-14T12:02:42', '10.12', '00:39:51', 'Running')]
30
30
+
+ summary = [(0, True, '2012-10-14T10:02:42', '10.12', '00:39:51', 'Running')]
31
31
+
activity = Activity(date_time_utc='2012-10-14T10:02:42Z', sport_id='1')
32
32
+
self.ddbb.session.add(activity)
33
33
+
self.ddbb.session.commit()
34
34
+
diff -Nurp source.orig/pytrainer/test/lib/test_date.py source/pytrainer/test/lib/test_date.py
35
35
+
--- source.orig/pytrainer/test/lib/test_date.py 2018-02-27 22:15:32.079243364 +0100
36
36
+
+++ source/pytrainer/test/lib/test_date.py 2018-02-27 22:16:33.936867052 +0100
28
37
@@ -45,4 +45,4 @@ class DateFunctionTest(unittest.TestCase
29
38
def test_getDateTime(self):
30
39
utctime, localtime = getDateTime('Tue Nov 24 17:29:05 UTC 2015')