|
Revision 67, 0.8 kB
(checked in by just, 4 years ago)
|
Moved Data, Lib and install.py one level down the tree
|
| Line | |
|---|
| 1 |
"""Install script for the RoboFab Package. |
|---|
| 2 |
|
|---|
| 3 |
This script installs a _link_ to the current location |
|---|
| 4 |
of RoboFab. It does not copy anything. It also means that |
|---|
| 5 |
if you move your RoboFab folder, you'll have to run the |
|---|
| 6 |
install script again. |
|---|
| 7 |
""" |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
from distutils.sysconfig import get_python_lib |
|---|
| 11 |
import os, sys |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
def install(srcDir, pathFileName): |
|---|
| 15 |
sitePackDir = get_python_lib() |
|---|
| 16 |
fileName = os.path.join(sitePackDir, pathFileName + ".pth") |
|---|
| 17 |
print "Installing RoboFab: about to write a path to %r in %r..." % (srcDir, fileName) |
|---|
| 18 |
f = open(fileName, 'w') |
|---|
| 19 |
f.write(srcDir) |
|---|
| 20 |
f.close() |
|---|
| 21 |
return fileName |
|---|
| 22 |
|
|---|
| 23 |
dir = os.path.join(os.path.dirname(os.path.normpath(os.path.abspath(sys.argv[0]))), "Lib") |
|---|
| 24 |
|
|---|
| 25 |
p = install(dir, "robofab") |
|---|
| 26 |
|
|---|
| 27 |
print "Robofab is now installed." |
|---|
| 28 |
print "(Note that you have to run the install script again if you move your RoboFab folder)" |
|---|