Changeset 2748 for pykota

Show
Ignore:
Timestamp:
02/22/06 19:37:28 (19 years ago)
Author:
jerome
Message:

sqlite database creation stuff was not installed !

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/setup.py

    r2699 r2748  
    6666data_files.append((os.path.join(docdir, "openoffice"), docfiles)) 
    6767 
    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  
    7268directory = os.sep.join(["share", "man", "man1"]) 
    7369manpages = glob.glob(os.sep.join(["man", "*.1"]))     
     
    109105data_files.append((mysqldirectory, ["initscripts/mysql/README.mysql", "initscripts/mysql/pykota-mysql.sql"])) 
    110106 
     107sqlitedirectory = os.sep.join([directory, "sqlite"]) 
     108data_files.append((sqlitedirectory, ["initscripts/sqlite/README.sqlite", "initscripts/sqlite/pykota-sqlite.sql"])) 
     109 
    111110os.umask(022) 
    112111setup(name = "pykota", version = __version__, 
  • pykota/trunk/tests/filldb.py

    r2740 r2748  
    123123if __name__ == "__main__" :     
    124124    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]) 
    126126    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]) 
    130135        if nbbillingcodes : 
    131136            bcodes = createBillingCodes(nbbillingcodes) 
     
    137142        if nbusers and nbprinters :     
    138143            createUserPQuotas(users, printers) 
    139             deleteUserPQuotas(users, printers) 
     144            if delete : 
     145                deleteUserPQuotas(users, printers) 
    140146             
    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. 
    147154        os.remove("arguments.list") 
    148155