-
Notifications
You must be signed in to change notification settings - Fork 230
Setting up a Development Environment
$ curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
~/.bashrc
or ~/.bash_profile
export PATH="${HOME}/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv
installs Python interpreters from scratch. Thus, your system must have the build system including the libraries such as GNU readline, zlib, bzip2, SQLite3 and OpenSSL.
$ sudo apt-get install build-essential libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libssl-dev
django-summernote must work on the fly with Python 2.x and 3.x.
$ pyenv install 2.7.13
$ pyenv install 3.4.6
$ pyenv install 3.5.3
$ pyenv install 3.6.2
You may check the list of available Python versions:
$ pyenv install —list
Activate your virtual environment:
$ python3.6 -m venv venv
$ source venv/bin/activate
Multiple Python versions are set to global:
(venv) $ pyenv global 3.6.2 3.5.3 3.4.6 2.7.13
You have to fork original django-summernote project. You may clone your own project:
git clone https://github.com/YOUR_ACCOUNT/django-summernote.git
cd django-summernote/
django-summernote project supports Tox/Travis.
(venv) $ pip install tox
(venv) $ pip freeze
pluggy==0.4.0
py==1.4.34
tox==2.7.0
virtualenv==15.1.0
Tox reads tox.ini
file, and test all by the combination of Django versions(1.8, 1.9, 1.10, 1.11) and Python versions(2.7, 3.4, 3.5, 3.6)
(venv) $ tox
If successfully built, you can see the messsage at the bottom as shown below:
___________________________ summary ____________________________________________
py27-dj108: commands succeeded
py27-dj108: commands succeeded
py27-dj109: commands succeeded
py27-dj110: commands succeeded
py27-dj111: commands succeeded
py34-dj108: commands succeeded
py34-dj109: commands succeeded
py34-dj110: commands succeeded
py34-dj111: commands succeeded
py35-dj108: commands succeeded
py35-dj109: commands succeeded
py35-dj110: commands succeeded
py35-dj111: commands succeeded
py36-dj111: commands succeeded
congratulations :)
After cloning the project, you can install django-summernote package for the purpose of development.
(venv) $ cd django-summernote/
(venv) $ python setup.py install -f