- Timestamp:
- 02/22/06 19:37:28 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/setup.py
r2699 r2748 66 66 data_files.append((os.path.join(docdir, "openoffice"), docfiles)) 67 67 68 data_files.append((os.path.join(docdir, "postgresql"), ["initscripts/postgresql/README.postgresql"]))69 data_files.append((os.path.join(docdir, "ldap"), ["initscripts/ldap/README.ldap"]))70 data_files.append((os.path.join(docdir, "mysql"), ["initscripts/mysql/README.mysql"]))71 72 68 directory = os.sep.join(["share", "man", "man1"]) 73 69 manpages = glob.glob(os.sep.join(["man", "*.1"])) … … 109 105 data_files.append((mysqldirectory, ["initscripts/mysql/README.mysql", "initscripts/mysql/pykota-mysql.sql"])) 110 106 107 sqlitedirectory = os.sep.join([directory, "sqlite"]) 108 data_files.append((sqlitedirectory, ["initscripts/sqlite/README.sqlite", "initscripts/sqlite/pykota-sqlite.sql"])) 109 111 110 os.umask(022) 112 111 setup(name = "pykota", version = __version__, -
pykota/trunk/tests/filldb.py
r2740 r2748 123 123 if __name__ == "__main__" : 124 124 if len(sys.argv) == 1 : 125 sys.stderr.write("usage : %s NbBillingCodes NbPrinters NbUsers\n" % sys.argv[0])125 sys.stderr.write("usage : %s [--nodelete] NbBillingCodes NbPrinters NbUsers\n" % sys.argv[0]) 126 126 else : 127 nbbillingcodes = int(sys.argv[1]) 128 nbprinters = int(sys.argv[2]) 129 nbusers = int(sys.argv[3]) 127 delete = True 128 args = sys.argv[1:] 129 if args[0] == "--nodelete" : 130 args = args[1:] 131 delete = False 132 nbbillingcodes = int(args[0]) 133 nbprinters = int(args[1]) 134 nbusers = int(args[2]) 130 135 if nbbillingcodes : 131 136 bcodes = createBillingCodes(nbbillingcodes) … … 137 142 if nbusers and nbprinters : 138 143 createUserPQuotas(users, printers) 139 deleteUserPQuotas(users, printers) 144 if delete : 145 deleteUserPQuotas(users, printers) 140 146 141 if nbbillingcodes : 142 deleteBillingCodes(bcodes) 143 if nbusers : 144 deleteUsers(users) # NB : either this one or the one below 145 if nbprinters : 146 deletePrinters(printers) # also delete user print quota entries. 147 if delete : 148 if nbbillingcodes : 149 deleteBillingCodes(bcodes) 150 if nbusers : 151 deleteUsers(users) # NB : either this one or the one below 152 if nbprinters : 153 deletePrinters(printers) # also delete user print quota entries. 147 154 os.remove("arguments.list") 148 155