diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2019-05-22 20:44:10 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2019-05-22 20:44:10 +0200 |
commit | f8ee49b34a703ddfc969e5452c2aca4523351d1e (patch) | |
tree | 46e25e1ead5d0bb6bdea45a4ab1aad1bc30fd5d8 /admin/Sources/Clients/ogagent/src/setup.py | |
parent | b994c5c324fe2a960a2a440b42d9660c5aa28f1f (diff) |
#913: Using version file to create and install new OGAgent 1.1.0a agents.
Diffstat (limited to 'admin/Sources/Clients/ogagent/src/setup.py')
-rw-r--r-- | admin/Sources/Clients/ogagent/src/setup.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/admin/Sources/Clients/ogagent/src/setup.py b/admin/Sources/Clients/ogagent/src/setup.py index f80bf33b..bb928706 100644 --- a/admin/Sources/Clients/ogagent/src/setup.py +++ b/admin/Sources/Clients/ogagent/src/setup.py @@ -31,8 +31,6 @@ @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: # py2exe 0.6.4 introduced a replacement modulefinder. @@ -61,6 +59,13 @@ 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(): @@ -115,7 +120,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, |