fonttools/robofab/install.py
Erik van Blokland d7b493a3cc initial import was at the wrong place
git-svn-id: http://svn.robofab.com/trunk@15 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-08 18:41:55 +00:00

29 lines
838 B
Python

"""Install script for the RoboFab Package.
This script installs a _link_ to the current location
of RoboFab. It does not copy anything. It also means that
if you move your RoboFab folder, you'll have to run the
install script again.
"""
from distutils.sysconfig import get_python_lib
import os, sys
def install(srcDir, pathFileName):
sitePackDir = get_python_lib()
fileName = os.path.join(sitePackDir, pathFileName + ".pth")
print "Installing RoboFab: about to write a path to %r in %r..." % (srcDir, fileName)
f = open(fileName, 'w')
f.write(srcDir)
f.close()
return fileName
dir = os.path.join(os.path.dirname(os.path.normpath(os.path.abspath(sys.argv[0]))), "Lib")
p = install(dir, "robofab")
print "Robofab is now installed."
print "(Note that you have to run the install script again if you move your RoboFab folder)"