◐ Shell
clean mode source ↗

Building from source · plotdevice/plotdevice · Discussion #59

If you're interested in using the bleeding edge code from the repository, there are a couple of ways to build it yourself.

Module builds

Your best bet is to create a virtual environment and install the module into it. Something like this will work:

git clone https://github.com/plotdevice/plotdevice.git
python3 -m venv env
./env/bin/pip3 install -U pip wheel
./env/bin/pip3 install ./plotdevice

You can then either use the command line tool like this:

./env/bin/plotdevice plotdevice/examples/Drawing/Logo.pv 

or use the virtual environment's python3 and import it yourself:

./env/bin/python3
Python 3.8.9 (default, May 17 2022, 12:55:41) 
[Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from plotdevice import *

Application builds

If you want the full application, and you have Xcode installed, the easiest approach is to cd into the repository and type:

You can also use py2app but it requires you to install a local copy of PyObjC first (which the dev setup command will add to the deps/local folder for you):

python3 setup.py dev
./deps/local/3.8.9/bin/python3 setup.py py2app

Note that the 3.8.9 in that second command depends on the version of python3 you used for the first command. Look inside the deps/local folder to see what's there.

Once the app or py2app build completes, you'll find the application in the dist directory:

open -R dist/PlotDevice.app