Changeset 1475 for pykota/trunk/setup.py
- Timestamp:
- 05/13/04 15:59:30 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/setup.py
r1430 r1475 24 24 # 25 25 # $Log$ 26 # Revision 1.40 2004/05/13 13:59:27 jalet 27 # Code simplifications 28 # 26 29 # Revision 1.39 2004/04/08 17:07:41 jalet 27 30 # pkpgcounter added … … 173 176 sys.exit(-1) 174 177 178 from distutils import sysconfig 175 179 sys.path.insert(0, "pykota") 176 180 from pykota.version import __version__, __doc__ … … 179 183 ACTION_ABORT = 1 180 184 185 def checkOldModule(path) : 186 """Checks if an old PyKota module is still in the destination (in case of upgrade).""" 187 fname = os.path.join(sysconfig.get_python_lib(), "pykota", path) 188 for ext in ["py", "pyc", "pyo"] : 189 fullname = "%s.%s" % (fname, ext) 190 if os.path.isfile(fullname) : 191 sys.stderr.write("ERROR : old module %s still exists. Remove it and restart installation.\n" % fullname) 192 sys.stderr.write("INSTALLATION ABORTED !\n") 193 sys.exit(-1) 194 181 195 def checkOldScript(cmd) : 182 196 """Checks if an old shell script is still around in /usr/bin.""" … … 282 296 sys.stderr.write("\nINSTALLATION ABORTED !\nPlease correct the problem and restart installation.\n") 283 297 sys.exit(-1) 298 299 # now checks if pre-1.19alpha8 code is still there 300 for module in ["accounters/querying", "accounters/external", "requesters/snmp"] : 301 checkOldModule(module) 284 302 285 303 # Second stage, we will fail if onfiguration is incorrect for security reasons … … 348 366 349 367 # WARNING MESSAGE 350 sys.stdout.write("WARNING : IF YOU ARE UPGRADING FROM A PRE-1.1 4 TO 1.16OR ABOVE\n")368 sys.stdout.write("WARNING : IF YOU ARE UPGRADING FROM A PRE-1.19alpha7 TO 1.19alpha7 OR ABOVE\n") 351 369 sys.stdout.write("AND USE THE POSTGRESQL BACKEND, THEN YOU HAVE TO MODIFY YOUR\n") 352 sys.stdout.write("DATABASE SCHEMA USING initscripts/postgresql/upgrade-to-1.14.sql\n") 353 sys.stdout.write("AND initscripts/postgresql/upgrade-to-1.16.sql\n") 370 sys.stdout.write("DATABASE SCHEMA USING initscripts/postgresql/upgrade-to-1.19.sql\n") 354 371 sys.stdout.write("PLEASE READ DOCUMENTATION IN initscripts/postgresql/ TO LEARN HOW TO DO.\n") 355 372 sys.stdout.write("YOU CAN DO THAT AFTER THE INSTALLATION IS FINISHED, OR PRESS CTRL+C NOW.\n") 356 sys.stdout.write("\n\nYOU DON'T HAVE ANYTHING SPECIAL TO DO IF THIS IS YOUR FIRST INSTALLATION\nOR IF YOU ARE ALREADY RUNNING VERSION 1.1 6OR ABOVE.\n\n")373 sys.stdout.write("\n\nYOU DON'T HAVE ANYTHING SPECIAL TO DO IF THIS IS YOUR FIRST INSTALLATION\nOR IF YOU ARE ALREADY RUNNING VERSION 1.19alpha7 OR ABOVE.\n\n") 357 374 dummy = raw_input("Please press ENTER when you have read the message above. ") 358 375