Hi,
As a chef user I thought I would give this a try. Docs are not clear. Any other framework I would have given up but I will give one more shot. This framework is not critical my any stretch of the imagination so unless docs are cleaned up I dont expect wide adoption esp for python devs.
That being said…
I can build a plan and export. I ssh into the container to find my pip install libs. Guess what they are nowhere to be found despite the below. So how do I do a simple pip install?
Requirement already satisfied: flask==0.12.2 in /hab/pkgs/core/python2/2.7.15/20181212185420/lib/python2.7/site-packages (from -r /hab/pkgs/david/flask/0.1.0/20181223112622/app/requirements.txt (line 1)) (0.12.2)
Requirement already satisfied: redis in /hab/pkgs/core/python2/2.7.15/20181212185420/lib/python2.7/site-packages (from -r /hab/pkgs/david/flask/0.1.0/20181223112622/app/requirements.txt (line 2)) (3.0.1)
Requirement already satisfied: itsdangerous>=0.21 in /hab/pkgs/core/python2/2.7.15/20181212185420/lib/python2.7/site-packages (from flask==0.12.2->-r /hab/pkgs/david/flask/0.1.0/20181223112622/app/requirements.txt (line
pkg_name=flask
pkg_origin=sfsfgsfg
pkg_version=“0.1.0”
pkg_maintainer=“The Habitat Maintainers humans@habitat.sh”
pkg_license=(“Apache-2.0”)
pkg_build_deps=(core/coreutils core/gcc core/python2)
pkg_deps=(
core/python2
)
do_download() {
return 0
}
do_verify() {
return 0
}
do_clean() {
return 0
}
do_build() {
pip install --upgrade pip
}
do_install() {
The application exists as a single file in the directory. A real application
would likely a single app directory or a few directories.
app_dir=$pkg_prefix/app
mkdir $app_dir
cp index.py $app_dir/
cp requirements.txt $app_dir/
cp app.py $app_dir/
cd $pkg_prefix
pip install -r $app_dir/requirements.txt
}