﻿Various notes about installation.

NECESSARY MODULES:
==================

TODO: Change the code to avoid Python modules six, rdflib, and psutil
which are not available on OVH (Mutualised hosting)
rdflib must be optional only.

SOME MANDATORY PYTHON LIBRARIES:

For the right Python version.

(OK) install pyparsing https://pypi.python.org/pypi/pyparsing/2.0.3#downloads
Install the Zip, it is probably easier.
python setup.py install

(OK) Install isodate
python setup.py install

(OK) Install rdflib  https://pypi.python.org/pypi/rdflib
python setup.py install


D:\Projects\Divers\Reverse\PythonStyle\htbin\revlib

(??) Install psutil
https://pypi.python.org/pypi/psutil

========================================================================================================================
Optional: Install win32

Problem when importing win32api.dll

win32 Python library not installed:DLL load failed: The specified module could not be found.

http://stackoverflow.com/questions/22490233/win32com-import-error-python-3-4

python C:\Python34\Scripts\pywin32_postinstall.py -install
========================================================================================================================
Optional: Install wmi
https://pypi.python.org/pypi/WMI

========================================================================================================================

AS A SCRIPT:
============

Installaing Apache is not necessary.
Its is enough to run survol with the stand-alone script cgiserver.py :

APACHE:
=======

Mandatory header for all scripts:
---------------------------------

On Linux, the Shebang is necessary to run CGI scripts.

#!C:\Python\3.2.3-0.2\python.exe -u
#!/usr/bin/python
Attention au coding:
  #!/usr/bin/python
          # -*- coding: latin-1 -*-
          import os, sys
          ...
          #!/usr/bin/python
          # -*- coding: iso-8859-15 -*-
          import os, sys
          ...
          #!/usr/bin/python
          # -*- coding: ascii -*-
          import os, sys


========================================================================================================================

PYTHONPATH
;C:\Python\3.2.3-0.2;C:\Python\3.2.3-0.2\Lib\site-packages

This is not enough:

# To set pythonpath in httpd.conf
# Or globally:
# SetEnv PYTHONPATH "C:\Documents and Settings\Remi\My Documents\Reverse\PythonStyle\htbin\revlib"

========================================================================================================================

Installation with setup.py:

Test with virtual env:

cd testarea:
scripts/activate

pip install survol-1.0.dev0.zip --upgrade

# Creation of the package:
# python setup.py sdist
#
# Installation:
# scripts\activate
# pip install ..\dist\survol-1.0.dev0.zip --upgrade --install-option="--port 12345"
#

========================================================================================================================
Adding favicon

https://realfavicongenerator.net

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">

========================================================================================================================
Install on OVH.

Many Python modules are available in the ovh package: six, rdflib, psutil

~/survol is the GIT repository
~/www is the HTML root
~/cgi-bin contains the CVGI scripts.

##########
In ~/cgi-bin, a symbolic link points to the survol repository, so it can be imported:
ls -l ~/survol/survol survol

A symbolic link so that ~/www points to the HTML pages in survol GIT repository:
ln -s ~/survol/survol/www/ www/ui

So the javascript entry point is:
http://www.primhillcomputers.com/ui/index.htm

