-
Notifications
You must be signed in to change notification settings - Fork 104
Setting up a new development environment
Rhet Turnbull edited this page Jul 23, 2020
·
1 revision
- Download and install Python if you haven't already. You'll need python3 and you'll want want a separate python than what is installed by default on MacOS. Options include:
If you want to build a stand-alone executable of osxphotos
I recommend Anaconda as the python.org version of python doesn't currently work to build the executable with pyinstaller
.
- Run the following commands in your terminal.
$ git clone https://github.com/RhetTbull/osxphotos.git
$ cd osxphotos
- Setup a virtual environment so you aren't developing in your system-wide python.
$ python3 -m venv .venv
# activate the new environment
$ source .venv/bin/activate
- Confirm you're now using the python in in the virtual environment.
$ which python3
/Users/rhet/Dropbox/Code/working/osxphotos/.venv/bin/python3
- Install additional packages required for testing.
$ python3 -m pip install pytest
$ python3 -m pip install pytest-mock
- Run setup.py develop which installs osxphotos such that it's linked to your dev environment so that any edits have immediate effect
$ python3 setup.py develop
- Run
osxphotos
-- this will run the version you just installed in the local environment
$ python3 -m osxphotos
- Run the tests
$ python3 -m pytest