File: build.py

package info (click to toggle)
python-mysqldb 0.1.1-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 264 kB
  • ctags: 244
  • sloc: ansic: 1,320; python: 1,079; makefile: 47; sh: 14
file content (18 lines) | stat: -rw-r--r-- 504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python

import license
print license.__doc__

import sys, os
# XXX probably will only work right on UNIX only.
version = sys.version[:3]
prefix = sys.prefix
config = "%s/lib/python%s/config" % (prefix, version)
os.system("cp %s/Makefile.pre.in ." % config)
os.system("make -f Makefile.pre.in boot")
os.system("make")
import MySQLdb
os.system("python -O -c 'import MySQLdb'")
print """Now, as root, run:
make install
cp MySQLdb.py{,c,o} %s/lib/python%s/site-packages""" % (prefix, version)