Choose a location on your hard disk to store the code libraries. For example:
Avoid using spaces or non-ASCII characters in folder names above the hTools2 folder.
Unzip and save it into the newly created code folder:
If you are used to git, you can clone the code directly from the project’s repository on github:
git clone https://github.com/gferreira/hTools2.git
Create a simple text file, containing the path to the Lib folder inside hTools2:
The easiest way to get the correct path is by dragging the Lib folder from Finder into a code editor or Terminal – so you’ll get the path without having to type it.
Save this file as hTools2.pth in the site-packages folder for the desired Python(s):
/Library/Python/2.5/site-packages/hTools2.pth /Library/Python/2.6/site-packages/hTools2.pth /Library/Python/2.7/site-packages/hTools2.pth
And that’s it.
This method will create a reference to the current Lib folder, in this case /code/hTools2/Lib/.
As an alternative to the manual installation (2a), it is also possible to install hTools2 by running a setup script.
In the Terminal, go the hTools2 folder, and simply run the script setup.py with Python:
cd /_code/hTools2/ python setup.py install
If you get an error message regarding user permissions, try running the script with sudo:
sudo python setup.py install
This will prompt you to input your user name and password to allow access to system folders.
This method will copy the Lib folder to the Python site-packages folder.
To check if hTools2 has been installed successfully, try to run this line in the RoboFont scripting window or in Terminal:
If no error message is returned, the installation was successful.