Commit 7863238ee235803fc0ae9988903b16bcbc448e30
1 parent
3920d3c7
Remove empty lines
Showing
1 changed file
with
1 additions
and
16 deletions
cscripts/__init__.py.in
| 1 | # ========================================================================== | 1 | # ========================================================================== |
| 2 | # cscripts Python module | 2 | # cscripts Python module |
| 3 | # | 3 | # |
| 4 | -# Copyright (C) 2015-2018 Juergen Knoedlseder | 4 | +# Copyright (C) 2015-2020 Juergen Knoedlseder |
| 5 | # | 5 | # |
| 6 | # This program is free software: you can redistribute it and/or modify | 6 | # This program is free software: you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by | 7 | # it under the terms of the GNU General Public License as published by |
| @@ -17,13 +17,11 @@ | @@ -17,13 +17,11 @@ | ||
| 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | # | 18 | # |
| 19 | # ========================================================================== | 19 | # ========================================================================== |
| 20 | - | ||
| 21 | # Python version check | 20 | # Python version check |
| 22 | import sys | 21 | import sys |
| 23 | req_version = (2,6) | 22 | req_version = (2,6) |
| 24 | cur_version = sys.version_info | 23 | cur_version = sys.version_info |
| 25 | 24 | ||
| 26 | - | ||
| 27 | # List all scripts in this module | 25 | # List all scripts in this module |
| 28 | __all__ = [ | 26 | __all__ = [ |
| 29 | "csbkgmodel", | 27 | "csbkgmodel", |
| @@ -59,17 +57,13 @@ __all__ = [ | @@ -59,17 +57,13 @@ __all__ = [ | ||
| 59 | "calutils", | 57 | "calutils", |
| 60 | "ioutils", | 58 | "ioutils", |
| 61 | "mputils" | 59 | "mputils" |
| 62 | - | ||
| 63 | ] | 60 | ] |
| 64 | - | ||
| 65 | if cur_version > req_version: | 61 | if cur_version > req_version: |
| 66 | __all__.extend(["csfindobs", | 62 | __all__.extend(["csfindobs", |
| 67 | "csiactcopy", | 63 | "csiactcopy", |
| 68 | "csiactdata", | 64 | "csiactdata", |
| 69 | "csiactobs"]) | 65 | "csiactobs"]) |
| 70 | 66 | ||
| 71 | - | ||
| 72 | - | ||
| 73 | # Import | 67 | # Import |
| 74 | from cscripts.csbkgmodel import csbkgmodel | 68 | from cscripts.csbkgmodel import csbkgmodel |
| 75 | from cscripts.cscaldb import cscaldb | 69 | from cscripts.cscaldb import cscaldb |
| @@ -103,34 +97,25 @@ from cscripts import obsutils | @@ -103,34 +97,25 @@ from cscripts import obsutils | ||
| 103 | from cscripts import modutils | 97 | from cscripts import modutils |
| 104 | from cscripts import calutils | 98 | from cscripts import calutils |
| 105 | from cscripts import ioutils | 99 | from cscripts import ioutils |
| 106 | - | ||
| 107 | if cur_version > req_version: | 100 | if cur_version > req_version: |
| 108 | from cscripts.csfindobs import csfindobs | 101 | from cscripts.csfindobs import csfindobs |
| 109 | from cscripts.csiactcopy import csiactcopy | 102 | from cscripts.csiactcopy import csiactcopy |
| 110 | from cscripts.csiactdata import csiactdata | 103 | from cscripts.csiactdata import csiactdata |
| 111 | from cscripts.csiactobs import csiactobs | 104 | from cscripts.csiactobs import csiactobs |
| 112 | 105 | ||
| 113 | - | ||
| 114 | - | ||
| 115 | # Delete version check variables | 106 | # Delete version check variables |
| 116 | del sys | 107 | del sys |
| 117 | del req_version | 108 | del req_version |
| 118 | del cur_version | 109 | del cur_version |
| 119 | 110 | ||
| 120 | - | ||
| 121 | - | ||
| 122 | # Add test function | 111 | # Add test function |
| 123 | - | ||
| 124 | def test(): | 112 | def test(): |
| 125 | """ | 113 | """ |
| 126 | Run cscripts tests. | 114 | Run cscripts tests. |
| 127 | """ | 115 | """ |
| 128 | - | ||
| 129 | from cscripts.tests import test_python_cscripts | 116 | from cscripts.tests import test_python_cscripts |
| 130 | test_python_cscripts.test(installed=True) | 117 | test_python_cscripts.test(installed=True) |
| 131 | 118 | ||
| 132 | - | ||
| 133 | # Add version | 119 | # Add version |
| 134 | - | ||
| 135 | __version__ = '@PACKAGE_VERSION@' | 120 | __version__ = '@PACKAGE_VERSION@' |
| 136 | 121 |