diff options
Diffstat (limited to 'admin/Sources/Clients/ogagent/src')
-rw-r--r-- | admin/Sources/Clients/ogagent/src/VERSION | 2 | ||||
-rw-r--r-- | admin/Sources/Clients/ogagent/src/opengnsys/__init__.py | 11 | ||||
-rw-r--r-- | admin/Sources/Clients/ogagent/src/setup.py | 23 | ||||
-rwxr-xr-x | admin/Sources/Clients/ogagent/src/update.sh | 1 |
4 files changed, 24 insertions, 13 deletions
diff --git a/admin/Sources/Clients/ogagent/src/VERSION b/admin/Sources/Clients/ogagent/src/VERSION index 9084fa2f..524cb552 100644 --- a/admin/Sources/Clients/ogagent/src/VERSION +++ b/admin/Sources/Clients/ogagent/src/VERSION @@ -1 +1 @@ -1.1.0 +1.1.1 diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py index 48453fb7..02e7c341 100644 --- a/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py +++ b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py @@ -26,9 +26,9 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -''' +""" @author: Adolfo Gómez, dkmaster at dkmon dot com -''' +""" from __future__ import unicode_literals # On centos, old six release does not includes byte2int, nor six.PY2 @@ -37,7 +37,11 @@ import six import modules from RESTApi import REST, RESTError -VERSION = '1.1.0' +try: + with open('VERSION', 'r') as v: + VERSION = v.read() +except IOError: + VERSION = '1.1.0' __title__ = 'OpenGnsys Agent' __version__ = VERSION @@ -46,7 +50,6 @@ __author__ = 'Adolfo Gómez' __license__ = "BSD 3-clause" __copyright__ = "Copyright VirtualCable S.L.U." - if not hasattr(six, 'byte2int'): if six.PY3: import operator diff --git a/admin/Sources/Clients/ogagent/src/setup.py b/admin/Sources/Clients/ogagent/src/setup.py index f80bf33b..15254f4f 100644 --- a/admin/Sources/Clients/ogagent/src/setup.py +++ b/admin/Sources/Clients/ogagent/src/setup.py @@ -26,12 +26,10 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -''' +""" @author: Adolfo Gómez, dkmaster at dkmon dot com @author: Ramón M. Gómez, ramongomez at us dot es -''' - -VERSION = '1.1.0' +""" # ModuleFinder can't handle runtime changes to __path__, but win32com uses them try: @@ -44,7 +42,8 @@ try: import py2exe.mf as modulefinder except ImportError: import modulefinder - import win32com, sys + import win32com + import sys for p in win32com.__path__[1:]: modulefinder.AddPackagePath("win32com", p) for extra in ["win32com.shell"]: # ,"win32com.mapi" @@ -56,13 +55,21 @@ except ImportError: # no build path setup, no worries. pass +import os from distutils.core import setup -import py2exe + import sys -import os + +# Reading version file: +try: + with open('VERSION', 'r') as v: + VERSION = v.read() +except IOError: + VERSION = '1.1.0' sys.argv.append('py2exe') + def get_requests_cert_file(): """Add Python requests or certifi .pem file for installers.""" import requests @@ -115,7 +122,7 @@ setup( } ], service=[udsservice], - data_files=[('', [get_requests_cert_file()]),('cfg', ['cfg/ogagent.cfg', 'cfg/ogclient.cfg'])], + data_files=[('', [get_requests_cert_file()]), ('cfg', ['cfg/ogagent.cfg', 'cfg/ogclient.cfg'])], options={ 'py2exe': { 'bundle_files': 3, diff --git a/admin/Sources/Clients/ogagent/src/update.sh b/admin/Sources/Clients/ogagent/src/update.sh index 1019ea85..e6e02ab3 100755 --- a/admin/Sources/Clients/ogagent/src/update.sh +++ b/admin/Sources/Clients/ogagent/src/update.sh @@ -33,6 +33,7 @@ function process { } cd $(dirname "$0") +[ -r VERSION ] && sed -i "s/Version [^<]*/Version $(cat VERSION)/" about-dialog.ui pyrcc4 -py3 OGAgent.qrc -o OGAgent_rc.py |