File: python3.patch

package info (click to toggle)
cmor 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 16,856 kB
  • sloc: ansic: 27,460; f90: 14,115; python: 11,636; sh: 3,501; makefile: 420; xml: 168
file content (53 lines) | stat: -rw-r--r-- 2,595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: Minor changes for python3
Author: Alastair McKinstry <mckinsrty@debian.org>
Last-Updated: 2020-12-19
Forwarded: no

Index: cmor-3.6.1/Test/test_python_CMIP6_CV_bad_data_specs.py
===================================================================
--- cmor-3.6.1.orig/Test/test_python_CMIP6_CV_bad_data_specs.py
+++ cmor-3.6.1/Test/test_python_CMIP6_CV_bad_data_specs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/python3
 # If this example is not executed from the directory containing the
 # CMOR code, please first complete the following steps:
 #
@@ -28,14 +28,14 @@ class TestCase(base_CMIP6_CV.BaseCVsTest
             error_flag = cmor.dataset_json('Test/CMOR_input_TestTables.json')
             table_id = cmor.load_table('CMIP6_6hrLev_bad_specs.json')
             time = cmor.axis(table_entry='time1', units='days since 2000-01-01',
-                            coord_vals=numpy.array(range(1)),
-                            cell_bounds=numpy.array(range(2)))
+                            coord_vals=numpy.array(list(range(1))),
+                            cell_bounds=numpy.array(list(range(2))))
             latitude = cmor.axis(table_entry='latitude', units='degrees_north',
-                                coord_vals=numpy.array(range(5)),
-                                cell_bounds=numpy.array(range(6)))
+                                coord_vals=numpy.array(list(range(5))),
+                                 cell_bounds=numpy.array(list(range(6))))
             longitude = cmor.axis(table_entry='longitude', units='degrees_east',
-                                coord_vals=numpy.array(range(5)),
-                                cell_bounds=numpy.array(range(6)))
+                                coord_vals=numpy.array(list(range(5))),
+                                cell_bounds=numpy.array(list(range(6))))
             plev3 = cmor.axis(table_entry='plev3', units='Pa',
                             coord_vals=numpy.array([85000., 50000., 25000.]))
             axis_ids = [longitude, latitude, plev3, time]
@@ -57,4 +57,4 @@ class TestCase(base_CMIP6_CV.BaseCVsTest
         self.assertCV("data_specs_version")
 
 if __name__ == '__main__':
-    unittest.main()
\ No newline at end of file
+    unittest.main()
Index: cmor-3.6.1/LibCV/PrePARE/PrePARE.py
===================================================================
--- cmor-3.6.1.orig/LibCV/PrePARE/PrePARE.py
+++ cmor-3.6.1/LibCV/PrePARE/PrePARE.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 #
 # Please first complete the following steps: