Skip to content

Commit 925941b

Browse files
authored
Merge pull request #9 from memory/update-cryptography
3.8.0: pin back pycrypto, drop py3.6 support
2 parents 9f95bf6 + f3917db commit 925941b

5 files changed

Lines changed: 417 additions & 415 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
strategy:
1010
matrix:
1111
python-version:
12-
- "3.6"
1312
- "3.7"
1413
- "3.8"
1514
- "3.9"
@@ -30,8 +29,8 @@ jobs:
3029
POETRY_VIRTUALENVS_CREATE: false
3130
- name: Check formatting
3231
run: poetry run black --check .
33-
- name: Lint with flakehell
34-
run: poetry run flakehell lint pydpkg test
32+
- name: Lint with flakeheaven
33+
run: poetry run flakeheaven lint pydpkg test
3534
- name: Lint with pylint
3635
run: poetry run pylint -d R0912 -d W0511 pydpkg/
3736
- name: Lint with pycodestyle (aka pep8)

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
POETRY_VIRTUALENVS_CREATE: false
2626
- name: Check formatting
2727
run: poetry run black --check .
28-
- name: Lint with flakehell
29-
run: poetry run flakehell lint pydpkg test
28+
- name: Lint with flakeheaven
29+
run: poetry run flakeheaven lint pydpkg test
3030
- name: Lint with pylint
3131
run: poetry run pylint -d R0912 -d W0511 pydpkg/
3232
- name: Lint with pycodestyle (aka pep8)

Makefile

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ SHELL = /bin/bash
66
NAME := pydpkg
77
PYMAJOR := 3
88
PYREV := 10
9-
PYPATCH := 0
9+
PYPATCH := 7
1010
PYVERSION := ${PYMAJOR}.${PYREV}.${PYPATCH}
1111
PYENV := ${HOME}/.pyenv/versions/${PYVERSION}
1212
VENV_NAME := ${NAME}-${PYVERSION}
1313
VENV := ${PYENV}/envs/${VENV_NAME}
14+
PYTHON_BIN := ${VENV}/bin/python
15+
POETRY_BIN := ${VENV}/bin/poetry
1416
EGGLINK := ${VENV}/lib/python${PYMAJOR}.${PYREV}/site-packages/${NAME}.egg-link
1517
export VIRTUAL_ENV := ${VENV}
1618
export PYENV_VERSION := ${VENV_NAME}
@@ -45,23 +47,23 @@ else
4547
endif
4648

4749
${PYENV}: ${BREW_SSL} ${BREW_READLINE} ${PYENV_BIN}
48-
${ARCH_PREFIX} pyenv install -s ${PYVERSION}
50+
${ARCH_PREFIX} ${PYENV_BIN} install -s ${PYVERSION}
4951

5052
${VENV}: ${PYENV}
5153
${ARCH_PREFIX} ${PYENV_BIN} virtualenv ${PYVERSION} ${VENV_NAME}
52-
${ARCH_PREFIX} python -m pip install -U pip setuptools wheel
53-
${ARCH_PREFIX} python -m pip install -U poetry
54-
${ARCH_PREFIX} poetry config virtualenvs.create false --local
55-
${ARCH_PREFIX} poetry config virtualenvs.in-project false --local
54+
${ARCH_PREFIX} ${PYTHON_BIN} -m pip install -U pip setuptools wheel
55+
${ARCH_PREFIX} ${PYTHON_BIN} -m pip install -U poetry
56+
${ARCH_PREFIX} ${POETRY_BIN} config virtualenvs.create false --local
57+
${ARCH_PREFIX} ${POETRY_BIN} config virtualenvs.in-project false --local
5658

5759
.python-version: ${VENV}
58-
echo ${VENV_NAME} >.python-version
60+
echo ${PYVERSION}/envs/${VENV_NAME} >.python-version
5961

6062
poetry.lock:
61-
poetry lock
63+
${ARCH_PREFIX} ${POETRY_BIN} lock
6264

6365
${EGGLINK}: poetry.lock
64-
poetry install
66+
${ARCH_PREFIX} ${POETRY_BIN} install
6567
touch ${EGGLINK}
6668

6769
setup: .python-version ${EGGLINK}
@@ -72,41 +74,42 @@ clean:
7274
nuke:
7375
git clean -fdx -e '*.ipynb'
7476
rm -f .python-version
75-
pyenv uninstall -f ${VENV_NAME}
77+
${ARCH_PREFIX} ${PYENV_BIN} uninstall -f ${PYVERSION}/envs/${VENV_NAME}
7678

7779
update: pyproject.toml
78-
poetry install
79-
poetry update
80+
${ARCH_PREFIX} ${POETRY_BIN} lock
81+
${ARCH_PREFIX} ${POETRY_BIN} install
82+
${ARCH_PREFIX} ${POETRY_BIN} update
8083

8184
format: setup
82-
poetry run isort . && poetry run black .
85+
${ARCH_PREFIX} ${POETRY_BIN} run isort . && poetry run black .
8386

8487
format-check: setup
85-
poetry run isort --check . && poetry run black --check .
88+
${ARCH_PREFIX} ${POETRY_BIN} run isort --check . && poetry run black --check .
8689

87-
test: black pylint flakehell pycodestyle pytest
90+
test: black pylint flakeheaven pycodestyle pytest
8891
@echo "Running all tests"
8992

9093
pytest: setup
9194
@echo "Running unit tests"
92-
poetry run pytest -p no:warnings tests
95+
${ARCH_PREFIX} ${POETRY_BIN} run pytest -p no:warnings tests
9396

9497
black: setup
9598
@echo "Checking code formatting and imports..."
96-
poetry run black --check .
99+
${ARCH_PREFIX} ${POETRY_BIN} run black --check .
97100

98101
pylint: setup
99102
@echo "Linting code style with pylint..."
100-
poetry run pylint -d R0912 -d W0511 ${NAME}
103+
${ARCH_PREFIX} ${POETRY_BIN} run pylint -d R0912 -d W0511 ${NAME}
101104

102-
flakehell: setup
103-
@echo "Linting code style with flakehell..."
104-
poetry run flakehell lint ${NAME} test
105+
flakeheaven: setup
106+
@echo "Linting code style with flakeheaven..."
107+
${ARCH_PREFIX} ${POETRY_BIN} run flakeheaven lint ${NAME} test
105108

106109
pycodestyle: setup
107110
@echo "Linting codestyle with pycodestyle (formerly pep8)"
108111
@# ignore E203 because pep8 and black disagree about whitespace before ':'
109-
poetry run pycodestyle --max-line-length=120 --ignore=E203 ${NAME}
112+
${ARCH_PREFIX} ${POETRY_BIN} run pycodestyle --max-line-length=120 --ignore=E203 ${NAME}
110113

111114
install: setup
112115

0 commit comments

Comments
 (0)