mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
5e6f0cb8d7
commit
2f9994807b
11 changed files with 1756 additions and 106 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,23 +1,25 @@
|
|||
FROM archlinux:base-devel
|
||||
|
||||
ENV PATH="$HOME/.poetry/bin:${PATH}"
|
||||
ENV PYTHONPATH=/aurweb
|
||||
ENV AUR_CONFIG=conf/config
|
||||
|
||||
# Install system-wide dependencies.
|
||||
COPY ./docker/scripts/install-deps.sh /install-deps.sh
|
||||
RUN /install-deps.sh
|
||||
|
||||
# Copy Docker scripts
|
||||
COPY ./docker /docker
|
||||
COPY ./docker/scripts/*.sh /usr/local/bin/
|
||||
|
||||
# Install system-wide dependencies.
|
||||
RUN /docker/scripts/install-deps.sh
|
||||
|
||||
# Copy over all aurweb files.
|
||||
COPY . /aurweb
|
||||
|
||||
# Working directory is aurweb root @ /aurweb.
|
||||
WORKDIR /aurweb
|
||||
|
||||
# Install pip directories now that we have access to /aurweb.
|
||||
RUN pip install -r requirements.txt
|
||||
# Install Python dependencies.
|
||||
RUN /docker/scripts/install-python-deps.sh
|
||||
|
||||
# Add our aur user.
|
||||
RUN useradd -U -d /aurweb -c 'AUR User' aur
|
||||
|
@ -27,6 +29,3 @@ RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
|||
|
||||
# Install translations.
|
||||
RUN make -C po all install
|
||||
|
||||
# Install package and scripts.
|
||||
RUN python setup.py install --install-scripts=/usr/local/bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue