use pip-tools for dependecy management, update setup script

This commit is contained in:
mcbloch 2019-04-05 01:25:30 +02:00
parent 3a5f31bfac
commit d33dc05840
4 changed files with 66 additions and 32 deletions

View file

@ -2,15 +2,22 @@
# A simple file to run all instructions from the README
## this should be run in the root of the repository
if [ ! -d "vent" ]; then
if [ ! -d "venv" ]; then
echo "No venv found, creating a new one"
python -m venv venv
fi
venv/bin/pip install -r requirements.txt
source venv/bin/activate
echo "Downloading dependencies"
pip-sync
echo "Copying config template. All custom config options can be set in the config.py file"
cd app
cp config.example.py config.py
cp -t . database/*
venv/bin/python create_database.py
rm -f add_* create_database.py
venv/bin/python haldis.py runserver
cd ..
echo "Seeding database"
./populate-db.sh
echo "You can now run the server with 'python app/haldis.py runserver'"

View file

@ -2,5 +2,5 @@
cd app
cp database/* .
../venv/bin/python create_database.py
python create_database.py
rm -f add_* create_database.py muhscheme

12
requirements.in Normal file
View file

@ -0,0 +1,12 @@
Flask
Flask-Login
Flask-Bootstrap
Flask-SQLAlchemy
Flask-DebugToolbar
airbrake
Flask-WTF
Flask-OAuthlib
Flask-Admin
Flask-Migrate
Flask-Script
pip-tools

View file

@ -1,25 +1,40 @@
Flask==0.12
Flask-Admin==1.4.2
Flask-Bootstrap==3.3.7.1
Flask-DebugToolbar==0.10.0
Flask-Login==0.4.0
Flask-Migrate==2.0.3
Flask-OAuthlib==0.9.3
Flask-SQLAlchemy==2.1
Flask-Script==2.0.5
Flask-WTF==0.14.2
Jinja2==2.9.5
Mako==1.0.6
MarkupSafe==0.23
PyMySQL==0.7.9
SQLAlchemy==1.1.5
WTForms==2.1
Werkzeug==0.11.15
airbrake==1.3.3
alembic==0.8.10
blinker==1.4
itsdangerous==0.24
oauthlib==2.0.1
requests==2.13.0
requests-oauthlib==0.7.0
six==1.10.0
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile
#
airbrake==2.1.2
alembic==1.0.8 # via flask-migrate
blinker==1.4 # via flask-debugtoolbar
certifi==2019.3.9 # via requests
chardet==3.0.4 # via requests
click==7.0 # via flask, pip-tools
dominate==2.3.5 # via flask-bootstrap
flask-admin==1.5.3
flask-bootstrap==3.3.7.1
flask-debugtoolbar==0.10.1
flask-login==0.4.1
flask-migrate==2.4.0
flask-oauthlib==0.9.5
flask-script==2.0.6
flask-sqlalchemy==2.3.2
flask-wtf==0.14.2
flask==1.0.2
idna==2.8 # via requests
itsdangerous==1.1.0 # via flask, flask-debugtoolbar
jinja2==2.10 # via flask
mako==1.0.8 # via alembic
markupsafe==1.1.1 # via jinja2, mako
oauthlib==2.1.0 # via flask-oauthlib, requests-oauthlib
pip-tools==3.6.0
python-dateutil==2.8.0 # via alembic
python-editor==1.0.4 # via alembic
requests-oauthlib==1.1.0 # via flask-oauthlib
requests==2.21.0 # via airbrake, requests-oauthlib
six==1.12.0 # via pip-tools, python-dateutil
sqlalchemy==1.3.2 # via alembic, flask-sqlalchemy
urllib3==1.24.1 # via requests
visitor==0.1.3 # via flask-bootstrap
werkzeug==0.15.2 # via flask, flask-debugtoolbar
wtforms==2.2.1 # via flask-admin, flask-wtf