oscarmlage.com

djangonaut, sysadmin and father x2

User Tools

Site Tools


temp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
temp [2017/04/26 15:26] Oscar M.temp [2020/08/06 10:02] (current) – created Oscar M.
Line 1: Line 1:
 +====== OpenWisp ======
 +
 +===== Virtualenv =====
 +
 +Creamos un virtualenv - y lo activamos - para no enguarrar el sistema, así todo lo que instalemos con ''pip'', en vez de instalarlo en el sistema lo instalaremos en el entorno virtual (dentro de la carpeta ''env'' en este caso):
  
 <code> <code>
-apt-get install curl build-essential python-pip +mkdir openwisp ; cd openwisp 
-pip install pythonbrew+$ python3 -mvenv --copies env 
 +$ . ./env/bin/activate 
 +(env)
 </code> </code>
  
-<file - ~/.bashrc> +===== Clonar código del repo =====
-... +
-[[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc" +
-</file>+
  
 <code> <code>
-$ . ~/.bashrc +(env)git clone git://github.com/openwisp/openwisp-controller.git src 
-pythonbrew install 2.7.3+(env)ls 
 +env/ src/
 </code> </code>
 +
 +Antes de nada comprobamos qué paquetes tenemos instalados en nuestro entorno virtual:
  
 <code> <code>
-# pythonbrew list +(env)$ pip list 
-# pythonbrew pythons +Package    Version 
-  Python-2.7.3+---------- ------- 
 +pip        19.2.3 
 +setuptools 41.2.0 
 +</code>
  
-# pythonbrew switch 2.7.3 +===== Instalación del proyecto =====
-Switched to Python-2.7.3+
  
-# python +<code> 
-Python 2.7.3 (default, Apr 26 2017, 17:27:20+(env)$ python setup.py develop 
-[GCC 4.4.5] on linux2 +(env)$ ./install-dev.sh 
-Type "help", "copyright", "credits" or "license" for more information+(env)$ pip install -r requirements-test.txt 
->>>+(env)$ npm install -g jslint
 </code> </code>
  
-  * https://raymii.org/s/tutorials/Install_Python_2.7_or_3_on_debian_6.html+Comprobamos de nuevo qué paquetes se han instalado en nuestro entorno virtual: 
 + 
 +<code> 
 +(env)$ pip list 
 +$ pip list 
 +Package                 Version     Location 
 +----------------------- ----------- ------------------------------------- 
 +appdirs                  1.4.4 
 +asgiref                  3.2.10 
 +attrs                    19.3.0 
 +autobahn                 20.7.1 
 +Automat                  20.2.0 
 +Babel                    2.8.0 
 +bcrypt                   3.1.7 
 +billiard                 3.6.3.0 
 +black                    19.10b0 
 +celery                   4.4.7 
 +certifi                  2020.6.20 
 +cffi                     1.14.1 
 +channels                 2.4.0 
 +chardet                  3.0.4 
 +click                    7.1.2 
 +constantly               15.1.0 
 +coverage                 5.2.1 
 +coveralls                2.1.1 
 +cryptography             3.0 
 +daphne                   2.5.0 
 +defusedxml               0.6.0 
 +Django                   3.0.9 
 +django-allauth           0.41.0 
 +django-extensions        2.2.9 
 +django-leaflet           0.27.1 
 +django-loci              0.3.3 
 +django-model-utils       4.0.0 
 +django-organizations     1.1.2 
 +django-phonenumber-field 4.0.0 
 +django-reversion         3.0.7 
 +django-sortedm2m         3.0.2 
 +django-taggit            1.3.0 
 +django-x509              0.7 
 +djangorestframework-gis  0.14 
 +docopt                   0.6.2 
 +flake8                   3.8.3 
 +hyperlink                20.0.1 
 +idna                     2.10 
 +importlib-metadata       1.7.0 
 +incremental              17.5.0 
 +isort                    5.3.0 
 +jsonfield                3.1.0 
 +kombu                    4.6.11 
 +mccabe                   0.6.1 
 +mock-ssh-server          0.8.2 
 +more-itertools           8.4.0 
 +netjsonconfig            0.8.1 
 +oauthlib                 3.1.0 
 +openwisp-controller      0.7.post1   /Users/oscar/code/python/openwisp/src 
 +openwisp-users           0.2.2 
 +openwisp-utils           0.5.1 
 +packaging                20.4 
 +paramiko                 2.7.1 
 +pathspec                 0.8.0 
 +phonenumbers             8.11.5 
 +Pillow                   7.2.0 
 +pip                      19.2.3 
 +pluggy                   0.13.1 
 +py                       1.9.0 
 +pyasn1                   0.4.8 
 +pyasn1-modules           0.2.8 
 +pycodestyle              2.6.0 
 +pycparser                2.20 
 +pyflakes                 2.2.0 
 +PyHamcrest               2.0.2 
 +PyNaCl                   1.4.0 
 +pyOpenSSL                19.1.0 
 +pyparsing                2.4.7 
 +pytest                   5.4.3 
 +pytest-asyncio           0.14.0 
 +pytest-cov               2.10.0 
 +pytest-django            3.9.0 
 +python3-openid           3.2.0 
 +pytz                     2020.1 
 +redis                    3.5.3 
 +regex                    2020.7.14 
 +requests                 2.24.0 
 +requests-oauthlib        1.3.0 
 +scp                      0.13.2 
 +service-identity         18.1.0 
 +setuptools               41.2.0 
 +six                      1.15.0 
 +sqlparse                 0.3.1 
 +swapper                  1.1.2.post1 
 +toml                     0.10.1 
 +Twisted                  20.3.0 
 +txaio                    20.4.1 
 +typed-ast                1.4.1 
 +urllib3                  1.25.10 
 +vine                     1.3.0 
 +wcwidth                  0.2.5 
 +zipp                     3.1.0 
 +zope.interface           5.1.0 
 +</code> 
 + 
 +Paquetes que he tenido que instalar manualmente a mayores: 
 + 
 +<code> 
 +(env)$ pip install channels 
 +(env)$ pip install django-leaflet 
 +(env)$ pip install "Pillow~=7.2.0" 
 +(env)$ pip install jsonfield 
 +(env)$ pip install cryptography 
 +(env)$ pip install "django-allauth<0.42.0" 
 +(env)$ pip install "django-extensions<2.3" 
 +(env)$ pip install "phonenumbers<8.12.0" 
 +(env)$ pip install django-organizations 
 +(env)$ pip install django-phonenumber-field 
 +(env)$ pip install "amqp<2.7" 
 +</code> 
 + 
 +Repetimos de nuevo los siguientes pasos: 
 + 
 +<code> 
 +(env)$ python setup.py develop 
 +(env)$ ./install-dev.sh 
 +(env)$ pip install -r requirements-test.txt 
 +</code>
temp.1493220412.txt.gz · Last modified: 2017/04/26 15:26 by Oscar M.