Convert to poetry

This commit is contained in:
Sumner Evans
2020-09-22 10:29:35 -06:00
parent e8e74afd10
commit 0ea03f3f79
4 changed files with 16 additions and 12 deletions

View File

@@ -22,11 +22,11 @@ lint:
before_script: before_script:
- ./cicd/install-project-deps.sh - ./cicd/install-project-deps.sh
script: script:
- pipenv run python setup.py check -mrs - poetry run python setup.py check -mrs
- pipenv run black --check . - poetry run black --check .
- pipenv run flake8 - poetry run flake8
- pipenv run mypy sublime tests/**/*.py - poetry run mypy sublime tests/**/*.py
- pipenv run cicd/custom_style_check.py - poetry run cicd/custom_style_check.py
test: test:
stage: test stage: test
@@ -37,7 +37,7 @@ test:
- Xvfb :119 -screen 0 1024x768x16 & - Xvfb :119 -screen 0 1024x768x16 &
- export DISPLAY=:119 - export DISPLAY=:119
script: script:
- pipenv run ./cicd/pytest.sh - poetry run ./cicd/pytest.sh
artifacts: artifacts:
paths: paths:
- htmlcov - htmlcov
@@ -47,7 +47,7 @@ build:
before_script: before_script:
- ./cicd/install-project-deps.sh - ./cicd/install-project-deps.sh
script: script:
- pipenv run python setup.py sdist - poetry run python setup.py sdist
artifacts: artifacts:
paths: paths:
- dist/* - dist/*
@@ -115,7 +115,7 @@ publish_release:
before_script: before_script:
- ./cicd/install-project-deps.sh - ./cicd/install-project-deps.sh
script: script:
- pipenv run ./cicd/publish-gitlab-release.sh - poetry run ./cicd/publish-gitlab-release.sh
# Scheduled Jobs # Scheduled Jobs
# ============================================================================= # =============================================================================

View File

@@ -3,5 +3,9 @@ export PYENV_ROOT="${HOME}/.pyenv"
export PATH="${PYENV_ROOT}/bin:$PATH" export PATH="${PYENV_ROOT}/bin:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"
export PIPENV_VENV_IN_PROJECT=1 pip3 install poetry
pipenv install --dev
mkdir -p ~/.config/pypoetry/
echo "[virtualenvs]" > ~/.config/pypoetry/config.toml
echo "in-project = true" >> ~/.config/pypoetry/config.toml
poetry install --dev

View File

@@ -3,7 +3,7 @@
set -xe set -xe
pushd docs pushd docs
pipenv run make html poetry run make html
popd popd
mv docs/_build/html public mv docs/_build/html public

View File

@@ -40,7 +40,7 @@ RUN apt update && \
RUN cd /usr/local/src && \ RUN cd /usr/local/src && \
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
RUN pip3 install pipenv RUN pip3 install poetry
# Install the correct Python version with pyenv # Install the correct Python version with pyenv
COPY install-python.sh /tmp/install-python.sh COPY install-python.sh /tmp/install-python.sh