use Poetry to deal with deps and package install

As the new-age Python package manager, Poetry brings a lot
of good additions to the table. It allows us to more easily
deal with virtualenvs for the project and resolve dependencies.

As of this commit, `requirements.txt` is replaced by Poetry,
configured at `pyproject.toml`.

In Docker and GitLab, we currently use Poetry in a root fashion.
We should work toward purely using virtualenvs in Docker, but,
for now we'd like to move forward with other things. The project
can still be installed to a virtualenv and used on a user's system
through Poetry; it is just not yet doing so in Docker.

Modifications:

* docker/scripts/install-deps.sh
    * Remove python dependencies.
* conf/config.defaults
    * Script paths have been updated to use '/usr/bin'.
* docker/git-entrypoint.sh
    * Use '/usr/bin/aurweb-git-auth' instead of
      '/usr/local/bin/aurweb-git-auth'.

Additions:

* docker/scripts/install-python-deps.sh
    * A script used purely to install Python dependencies with Poetry.
      This has to be used within the aurweb project directory and
      requires system-wide dependencies are installed beforehand.
    * Also upgrades system-wide pip.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-09-04 10:02:13 -07:00
parent 5e6f0cb8d7
commit 2f9994807b
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
11 changed files with 1756 additions and 106 deletions

View file

@ -34,8 +34,8 @@ commit_uri = /cgit/aur.git/commit/?h=%s&id=%s
snapshot_uri = /cgit/aur.git/snapshot/%s.tar.gz
enable-maintenance = 1
maintenance-exceptions = 127.0.0.1
render-comment-cmd = /usr/local/bin/aurweb-rendercomment
localedir = /srv/http/aurweb/aur.git/web/locale/
render-comment-cmd = /usr/bin/aurweb-rendercomment
localedir = /srv/http/aurweb/web/locale/
; memcache, apc, or redis
; memcache/apc are supported in PHP, redis is supported in Python.
cache = none
@ -49,7 +49,7 @@ request_limit = 4000
window_length = 86400
[notifications]
notify-cmd = /usr/local/bin/aurweb-notify
notify-cmd = /usr/bin/aurweb-notify
sendmail =
smtp-server = localhost
smtp-port = 25
@ -68,7 +68,7 @@ RSA = SHA256:Ju+yWiMb/2O+gKQ9RJCDqvRg7l+Q95KFAeqM5sr6l2s
[auth]
valid-keytypes = ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-ed25519 sk-ssh-ecdsa@openssh.com sk-ssh-ed25519@openssh.com
username-regex = [a-zA-Z0-9]+[.\-_]?[a-zA-Z0-9]+$
git-serve-cmd = /usr/local/bin/aurweb-git-serve
git-serve-cmd = /usr/bin/aurweb-git-serve
ssh-options = restrict
[sso]
@ -83,7 +83,7 @@ session_secret =
repo-path = /srv/http/aurweb/aur.git/
repo-regex = [a-z0-9][a-z0-9.+_-]*$
git-shell-cmd = /usr/bin/git-shell
git-update-cmd = /usr/local/bin/aurweb-git-update
git-update-cmd = /usr/bin/aurweb-git-update
ssh-cmdline = ssh aur@aur.archlinux.org
[update]