When running Python model adapters within FEWS, Python should be installed on your system and the dependencies (Python packages) of your adapter as well. The proposed way to do this is to:
Working with virtual environment
...
Code Block |
---|
|
pip install virtualenvwrapper-win |
Create Python package
The python scaffold package (https://pypi.python.org/pypi/Scaffold/0.1.3) helps to create a proper directory structure for your package, following the structure as explained in http://www.scotttorborg.com/python-packaging/minimal.html
...
Code Block |
---|
|
python setup.py develop |
Adjusting setup.py
The setup.py
file is used for meta information of the package and for the requirements. The initial setup.py
file, as created by scaffold, looks like this:
...