Contributions to pyspotify are welcome! Here are some tips to get you started hacking on pyspotify and contributing back your patches.
Make sure you have the following Python versions installed:
If you’re on Ubuntu, the Dead Snakes PPA has packages of both old and new Python versions.
Install the following with development headers: Python, libffi, and libspotify.
On Debian/Ubuntu, make sure you have apt.mopidy.com in your APT sources to get the libspotify package, then run:
sudo apt-get install python-all-dev python3-all-dev libffi-dev libspotify-dev
Create and activate a virtualenv:
virtualenv ve
source ve/bin/activate
Install development dependencies:
pip install -r dev-requirements.txt
Run tests.
For a quick test suite run, using the virtualenv’s Python version:
py.test
For a complete test suite run, using all the Python implementations:
tox
For some more development task helpers, install invoke:
pip install invoke
To list available tasks, run:
invoke --list
For example, to run tests on any file change, run:
invoke test --watch
Or, to build docs when any file changes, run:
invoke docs --watch
See the file tasks.py for the task definitions.