Skip to content

Setting up a Development Environment

pincoin edited this page Aug 19, 2017 · 7 revisions

THIS IS DRAFT.

Prep

pyenv

Installation

$ curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash

Setup

~/.bashrc or ~/.bash_profile

export PATH="${HOME}/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Dependency Packages

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

Python installation

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

Virtual Environment

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

django-summernote Build and Test

Clone github project

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/

Tox Installation

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 Test

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 :)

django-summernote Manual Installation

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

Pull Requests

Clone this wiki locally