Skip to content

Commit 865084a

Browse files
committed
* Updated poetry config to create virtualenv in-project while installing.
* Updated flake8 to ignore poetry's venv. * Updated github actions to reflect both previous changes.
1 parent ae9f324 commit 865084a

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[flake8]
2-
exclude=.git,.pytest_cache,venv
2+
exclude=.git,.pytest_cache,.venv,venv

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
rm get-poetry.py
2727
- name: Lint with flake8
2828
run: |
29+
# activate the virtualenv created by poetry
30+
source .venv/bin/activate
2931
# stop the build if there are Python syntax errors or undefined names
3032
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3133
# the GitHub editor is 127 chars wide

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
rm get-poetry.py
2727
- name: Poetry - Set Version & Build
2828
run: |
29-
poetry version ${{ steps.get_version.outputs.VERSION }}
30-
poetry build
29+
$HOME/.poetry/bin/poetry version ${{ steps.get_version.outputs.VERSION }}
30+
$HOME/.poetry/bin/poetry build
3131
- name: Push to PyPI
3232
run: |
33-
poetry publish --build --username "${{ secrets.PYPI_USERNAME }}" --password "${{ secrets.PYPI_PASSWORD }}" --no-interaction
33+
$HOME/.poetry/bin/poetry publish --build --username "${{ secrets.PYPI_USERNAME }}" --password "${{ secrets.PYPI_PASSWORD }}" --no-interaction
3434
- name: Create Release
3535
id: create_release
3636
uses: actions/create-release@v1

poetry.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[virtualenvs]
2+
create = true
3+
in-project = true

0 commit comments

Comments
 (0)