[Pypi-checkins] r793 - trunk/pypi/tools
richard
python-checkins at python.org
Sat Jul 24 13:00:37 CEST 2010
Author: richard
Date: Sat Jul 24 13:00:37 2010
New Revision: 793
Removed:
trunk/pypi/tools/mksqlite
Log:
rename for convenience
Deleted: /trunk/pypi/tools/mksqlite
==============================================================================
--- /trunk/pypi/tools/mksqlite Sat Jul 24 13:00:37 2010
+++ (empty file)
@@ -1,27 +0,0 @@
-#!/usr/bin/python
-import os
-dbpath = "packages.db"
-
-if os.path.exists(dbpath):
- print "Remove",dbpath,"first"
- raise SystemExit
-
-print "Creating database", dbpath
-sqlite = os.popen('sqlite3 '+dbpath, "w")
-passthrough = True
-for line in open('pkgbase_schema.sql'):
- if 'nosqlite-end' in line:
- # end of disabled block
- passthrough = True
- print >>sqlite
- continue
- if 'nosqlite' in line:
- passthrough = False
- print >>sqlite
- continue
- if not passthrough:
- print >> sqlite
- continue
- # make sqlite happy: SERIAL is not a valid type
- sqlite.write(line.replace('SERIAL PRIMARY KEY', 'INTEGER PRIMARY KEY'))
-sqlite.close()
More information about the Pypi-checkins
mailing list