On Mon, Dec 16, 2013 at 6:16 PM, Braddock <bradd...@braddock.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > If this can be made to work it would certainly make things easier for > us at Internet-in-a-Box. >
Quick test in XO-4 using the following script, it seems it works perfectly: mkdir iiab cd iiab virtualenv venv source venv/bin/activate pip install --use-wheel --no-index --find-links=http://xsce.activitycentral.com/wheelhouse/ 'backports.lzma>=0.0.2' 'SQLAlchemy>=0.8.2' 'markupsafe' pip install Internet-in-a-Box iiab-server ... werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:19] "GET /iiab/ HTTP/1.1" 200 - I'm attaching the full log. I plan to do more testing. I think we could use this method for latter XSCE versions. > Currently we have to build and distribute Fedora rpms just for XSCE, > including for a couple third party packages which have binary > dependencies and have proven a pain. > > We already maintain pipy pip packages and use them for all of our own > IIAB appliance deployments. > > However, a virtualenv is not really meant as a distribution format and > has some downsides. You will have to install the pip on every > architecture you support, and I do not believe they are relocatable so > they have to be in the same absolute path, and they may have system > library dependencies which won't automatically be resolved like with RPMs. > > Given the fragility and dependency hell of the RPM method though, I > think it is worthwhile to switch to virtualenvs. > > - -braddock > > >> From: Miguel Gonz?lez <migonzal...@activitycentral.com> >> >> I want to share with you my proposed approach to install Python >> web application in XSCE. >> >> >> The idea is to install them into a Python virtual environment >> isolated from the system wide packages installed. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJSrzWJAAoJEHWLR/DQzlZu2i8H/iuxZPLPnu60JzE4UiqpDo3v > sPxqJgOjSA/lNj/icpl1EY0AaPUgcUWIOnmF2loYSMwR6AfzUbLH35OuPfXVZ8cY > +3eSbT+BnqiQiV+vpsVJQ7NFYipICetldzN4jlhGLgFpVCRgwvDaQCLrgw0MY67y > 6xmkI+e4g01i4q4DLA8+jEtlDGeVYWdTmcugka4a/w9UDKIBIfmZ2LCsZq/XoZxB > p895BjYHWk/RSYGC3GC8o1pmXksUIMzf211Lkw3aunXD5G9+tW1ozSktcMEDxAlr > DAXDduyOemEzLa5o1KdMsMbq9ENpBegY3ekejL9ftaN1uyebXVXDD/t32roAVD8= > =9YGH > -----END PGP SIGNATURE----- > _______________________________________________ > Server-devel mailing list > Server-devel@lists.laptop.org > http://lists.laptop.org/listinfo/server-devel -- Miguel González Activity Central: http://www.activitycentral.com
[olpc@computer ~]$ mkdir iiab [olpc@computer ~]$ cd iiab [olpc@computer iiab]$ virtualenv venv New python executable in venv/bin/python Installing Setuptools..............................................................................................................................................................................................................................done. Installing Pip.....................................................................................................................................................................................................................................................................................................................................done. [olpc@computer iiab]$ source venv/bin/activate (venv)[olpc@computer iiab]$ pip install --use-wheel --no-index --find-links=http://xsce.activitycentral.com/wheelhouse/ 'backports.lzma>=0.0.2' 'SQLAlchemy>=0.8.2' 'markupsafe' Ignoring indexes: https://pypi.python.org/simple/ Downloading/unpacking backports.lzma>=0.0.2 Downloading backports.lzma-0.0.2-cp27-none-linux_armv7l.whl Downloading/unpacking SQLAlchemy>=0.8.2 Downloading SQLAlchemy-0.8.4-cp27-none-linux_armv7l.whl (833kB): 833kB downloaded Downloading/unpacking markupsafe Downloading MarkupSafe-0.18-cp27-none-linux_armv7l.whl Installing collected packages: backports.lzma, SQLAlchemy, markupsafe Successfully installed backports.lzma SQLAlchemy markupsafe Cleaning up... (venv)[olpc@computer iiab]$ pip install Internet-in-a-Box Downloading/unpacking Internet-in-a-Box Downloading Internet-in-a-Box-0.5.5.tar.gz (938kB): 938kB downloaded Running setup.py egg_info for package Internet-in-a-Box Downloading/unpacking Flask>=0.10 (from Internet-in-a-Box) Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded Running setup.py egg_info for package Flask warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Downloading/unpacking Flask-Babel>=0.8 (from Internet-in-a-Box) Downloading Flask-Babel-0.9.tar.gz Running setup.py egg_info for package Flask-Babel warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Downloading/unpacking Flask-AutoIndex (from Internet-in-a-Box) Downloading Flask-AutoIndex-0.5.tar.gz (61kB): 61kB downloaded Running setup.py egg_info for package Flask-AutoIndex warning: no previously-included files matching '*.pyc' found under directory 'tests' Downloading/unpacking Flask-SQLAlchemy (from Internet-in-a-Box) Downloading Flask-SQLAlchemy-1.0.tar.gz (92kB): 92kB downloaded Running setup.py egg_info for package Flask-SQLAlchemy warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Requirement already satisfied (use --upgrade to upgrade): SQLAlchemy>=0.8.2 in ./venv/lib/python2.7/site-packages (from Internet-in-a-Box) Downloading/unpacking whoosh>=2.4.1 (from Internet-in-a-Box) Downloading Whoosh-2.5.5.tar.gz (964kB): 964kB downloaded Running setup.py egg_info for package whoosh warning: no files found matching '*.txt' under directory 'tests' warning: no files found matching '*.txt' under directory 'benchmark' warning: no files found matching '*.txt' under directory 'docs' warning: no files found matching '*.txt' under directory 'files' warning: no files found matching '*.py' under directory 'files' warning: no files found matching '*.jpg' under directory 'files' Requirement already satisfied (use --upgrade to upgrade): backports.lzma>=0.0.2 in ./venv/lib/python2.7/site-packages (from Internet-in-a-Box) Downloading/unpacking repoze.lru (from Internet-in-a-Box) Downloading repoze.lru-0.6.tar.gz Running setup.py egg_info for package repoze.lru Downloading/unpacking Werkzeug>=0.7 (from Flask>=0.10->Internet-in-a-Box) Downloading Werkzeug-0.9.4.tar.gz (1.1MB): 1.1MB downloaded Running setup.py egg_info for package Werkzeug warning: no files found matching '*' under directory 'werkzeug/debug/templates' warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' Downloading/unpacking Jinja2>=2.4 (from Flask>=0.10->Internet-in-a-Box) Downloading Jinja2-2.7.1.tar.gz (377kB): 377kB downloaded Running setup.py egg_info for package Jinja2 warning: no files found matching '*' under directory 'custom_fixers' warning: no previously-included files matching '*' found under directory 'docs/_build' warning: no previously-included files matching '*.pyc' found under directory 'jinja2' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'jinja2' warning: no previously-included files matching '*.pyo' found under directory 'docs' Downloading/unpacking itsdangerous>=0.21 (from Flask>=0.10->Internet-in-a-Box) Downloading itsdangerous-0.23.tar.gz (46kB): 46kB downloaded Running setup.py egg_info for package itsdangerous warning: no previously-included files matching '*' found under directory 'docs/_build' Downloading/unpacking Babel>=1.0 (from Flask-Babel>=0.8->Internet-in-a-Box) Downloading Babel-1.3.tar.gz (3.4MB): 3.4MB downloaded Running setup.py egg_info for package Babel warning: no previously-included files matching '*' found under directory 'docs/_build' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' Downloading/unpacking speaklater>=1.2 (from Flask-Babel>=0.8->Internet-in-a-Box) Downloading speaklater-1.3.tar.gz Running setup.py egg_info for package speaklater Downloading/unpacking Flask-Silk>=0.2 (from Flask-AutoIndex->Internet-in-a-Box) Downloading Flask-Silk-0.2.tar.gz (627kB): 627kB downloaded [31/274] Running setup.py egg_info for package Flask-Silk Requirement already satisfied (use --upgrade to upgrade): setuptools in ./venv/lib/python2.7/site-packages (from Flask-SQLAlchemy->Internet-in-a-Box) Requirement already satisfied (use --upgrade to upgrade): markupsafe in ./venv/lib/python2.7/site-packages (from Jinja2>=2.4->Flask>=0.10->Internet-in-a-Box) Downloading/unpacking pytz>=0a (from Babel>=1.0->Flask-Babel>=0.8->Internet-in-a-Box) Downloading pytz-2013.8.tar.bz2 (177kB): 177kB downloaded Running setup.py egg_info for package pytz warning: no files found matching '*.pot' under directory 'pytz' warning: no previously-included files found matching 'test_zdump.py' Installing collected packages: Internet-in-a-Box, Flask, Flask-Babel, Flask-AutoIndex, Flask-SQLAlchemy, whoosh, repoze.lru, Werkzeug, Jinja2, itsdangerous, Babel, speaklater, Flask-Silk, pytz Running setup.py install for Internet-in-a-Box changing mode of build/scripts-2.7/iiab-server from 664 to 775 changing mode of build/scripts-2.7/iiab.wsgi from 664 to 775 changing mode of /home/olpc/iiab/venv/bin/iiab.wsgi to 775 changing mode of /home/olpc/iiab/venv/bin/iiab-server to 775 Running setup.py install for Flask warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Running setup.py install for Flask-Babel warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Running setup.py install for Flask-AutoIndex warning: no previously-included files matching '*.pyc' found under directory 'tests' Running setup.py install for Flask-SQLAlchemy warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/_themes/.git' Running setup.py install for whoosh warning: no files found matching '*.txt' under directory 'tests' warning: no files found matching '*.txt' under directory 'benchmark' warning: no files found matching '*.txt' under directory 'docs' warning: no files found matching '*.txt' under directory 'files' warning: no files found matching '*.py' under directory 'files' warning: no files found matching '*.jpg' under directory 'files' Running setup.py install for repoze.lru Skipping installation of /home/olpc/iiab/venv/lib/python2.7/site-packages/repoze/__init__.py (namespace package) Installing /home/olpc/iiab/venv/lib/python2.7/site-packages/repoze.lru-0.6-py2.7-nspkg.pth Running setup.py install for Werkzeug warning: no files found matching '*' under directory 'werkzeug/debug/templates' warning: no files found matching '*' under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'docs' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'examples' warning: no previously-included files matching '*.pyo' found under directory 'examples' no previously-included directories found matching 'docs/_build' Running setup.py install for Jinja2 warning: no files found matching '*' under directory 'custom_fixers' warning: no previously-included files matching '*' found under directory 'docs/_build' warning: no previously-included files matching '*.pyc' found under directory 'jinja2' warning: no previously-included files matching '*.pyc' found under directory 'docs' warning: no previously-included files matching '*.pyo' found under directory 'jinja2' warning: no previously-included files matching '*.pyo' found under directory 'docs' Running setup.py install for itsdangerous warning: no previously-included files matching '*' found under directory 'docs/_build' Running setup.py install for Babel warning: no previously-included files matching '*' found under directory 'docs/_build' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyo' found under directory 'tests' Installing pybabel script to /home/olpc/iiab/venv/bin Running setup.py install for speaklater Running setup.py install for Flask-Silk Running setup.py install for pytz warning: no files found matching '*.pot' under directory 'pytz' warning: no previously-included files found matching 'test_zdump.py' Successfully installed Internet-in-a-Box Flask Flask-Babel Flask-AutoIndex Flask-SQLAlchemy whoosh repoze.lru Werkzeug Jinja2 itsdangerous Babel speaklater Flask-Silk pytz Cleaning up... (venv)[olpc@computer iiab]$ iiab-server ERROR loading Khan Videos: (<type 'exceptions.OSError'>, OSError(2, 'No such file or directory'), <traceback object at 0xe55da0>) werkzeug -- * Running on http://0.0.0.0:25000/ werkzeug -- * Restarting with reloader ERROR loading Khan Videos: (<type 'exceptions.OSError'>, OSError(2, 'No such file or directory'), <traceback object at 0xf66fd0>) werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:19] "GET /iiab/ HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/jquery.mobile-1.2.1.min.css HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/jquery-migrate-1.0.0.js HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/jquery-1.9.0.min.js HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/iiab.css HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/jquery.mobile-1.2.1.min.js HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/images/ajax-loader.gif HTTP/1.1" 200 - werkzeug -- 192.168.0.3 - - [16/Dec/2013 18:40:20] "GET /static/lib/images/icons-18-white.png HTTP/1.1" 200 -
_______________________________________________ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel