Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jarun#753] temporarily block flake-admin-v2 & actualize install instructions #754

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions bukuserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,28 @@ So be sure to have `python3`, `python3-pip` , `python3-dev`, `libffi-dev` packag
#### Dependencies

```
$ python3 -m pip install --user --upgrade pip
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on OS, pip install --user is no longer allowed (unless you pass --break-system-packages as well)

$ python3 -m pip install --user virtualenv
$ python3 -m virtualenv env
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing virtualenv is no longer necessary: the venv module is included in basic Python installation (and accomplishes the same result)

$ 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

```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]"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reverse_proxy] is no longer present in setup.py

```

#### Using Docker
Expand Down
2 changes: 1 addition & 1 deletion bukuserver/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions bukuserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This includes the error message into the warning, making it easier to tell what happened



def create_app(db_file=None):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down