From f28ccd598cb0f60ba0238c2641a32cc9a0ca8e3d Mon Sep 17 00:00:00 2001 From: LeXofLeviafan Date: Sat, 20 Jul 2024 11:50:23 +0200 Subject: [PATCH] [jarun#753] temporarily block flake-admin-v2 & actualize install instructions --- bukuserver/README.md | 19 +++++++------------ bukuserver/requirements.txt | 2 +- bukuserver/server.py | 4 ++-- setup.py | 2 +- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/bukuserver/README.md b/bukuserver/README.md index 816ab19c..ab78a867 100644 --- a/bukuserver/README.md +++ b/bukuserver/README.md @@ -20,22 +20,19 @@ So be sure to have `python3`, `python3-pip` , `python3-dev`, `libffi-dev` packag #### Dependencies ``` -$ python3 -m pip install --user --upgrade pip -$ python3 -m pip install --user virtualenv -$ python3 -m virtualenv env -$ source env/bin/activate +$ # venv activation (for development) +$ python3 -m venv venv +$ source venv/bin/activate +$ pip install --upgrade pip ``` #### From PyPi ```sh -$ # basic server +$ # regular/venv install $ pip3 install "buku[server]" -$ # server with reverse proxy -$ pip3 install "buku[server,reverse_proxy]" -$ # pipx install bukuserver with reverse proxy +$ # pipx install $ pipx install "buku[server]" -$ pipx inject buku https://github.com/rachmadaniHaryono/flask-reverse-proxy-fix/archive/refs/tags/v0.2.2rc1.zip ``` #### From source @@ -43,10 +40,8 @@ $ pipx inject buku https://github.com/rachmadaniHaryono/flask-reverse-proxy-fix/ ```sh $ git clone https://github.com/jarun/buku $ cd buku -$ # basic server +$ # regular/venv install $ pip3 install ".[server]" -$ # server with reverse_proxy -$ pip3 install ".[server,reverse_proxy]" ``` #### Using Docker diff --git a/bukuserver/requirements.txt b/bukuserver/requirements.txt index 51b93258..3e8304c1 100644 --- a/bukuserver/requirements.txt +++ b/bukuserver/requirements.txt @@ -1,5 +1,5 @@ arrow>=1.2.2 -Flask-Admin>=1.6.1 +Flask-Admin>=1.6.1,<2 Flask-API>=3.0.post1 Flask-Bootstrap>=3.3.7.1 flask-paginate>=2022.1.8 diff --git a/bukuserver/server.py b/bukuserver/server.py index a736fc6c..087a48f3 100644 --- a/bukuserver/server.py +++ b/bukuserver/server.py @@ -76,8 +76,8 @@ def init_locale(app): except ImportError: from flask_babel import Babel Babel().init_app(app, locale_selector=lambda: app.config['BUKUSERVER_LOCALE']) - except Exception: - app.logger.warning('failed to init locale') + except Exception as e: + app.logger.warning(f'failed to init locale ({e})') def create_app(db_file=None): diff --git a/setup.py b/setup.py index 4475573b..4b4b4630 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ server_require = [ "arrow>=1.2.2", - "Flask-Admin>=1.6.1", + "Flask-Admin>=1.6.1,<2", "Flask-API>=3.0.post1", "Flask-Bootstrap>=3.3.7.1", "flask-paginate>=2022.1.8",