Skip to content

Commit

Permalink
Settle on Python 3.12 for the "official version"
Browse files Browse the repository at this point in the history
The README needed updating, and I wanted to provide a way to install
without relying on pipenv. So I added a make target for this and
documented it. But really, pipenv expects that you're just using a
single Python version, and for simplicity, it should be the most recent
version available on OL9. Thus, I've reset all the depnedencies to 3.12.

Now, the README shows a valid way to install (some version of) the
dependencies and get the project running, and using pipenv will set it
up with the exact dependencies too. The CI system will use Python 3.12
too, so we should be set.

Signed-off-by: Stephen Brennan <[email protected]>
  • Loading branch information
brenns10 committed Nov 13, 2024
1 parent e4de10d commit 5cdd94b
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'
- name: Install pre-commit and mypy
run: pip install pipenv && make dev
- name: Run pre-commit hooks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gzip bzip2 xz-utils zstd tar rpm cpio dpkg make
pip install pipenv
make venv
mkdir -p .venv && pipenv install
- name: Checkout gh-pages and setup git
run: |
git fetch origin gh-pages --depth=1
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Copyright (c) 2024, Oracle and/or its affiliates.
# Licensed under the terms of the GNU General Public License.

PYTHON ?= python3.13
PYTHON ?= python3.12

.PHONY: venv
venv:
@mkdir -p .venv # ensure that pipenv sees .venv
$(PYTHON) -m pipenv install
rm -rf .venv
$(PYTHON) -m venv .venv
sed -n '/^\[packages\]$$/,/^\[dev-packages\]$$/p' Pipfile | grep -v '^\[' | sed 's/ =.*$$//' | xargs .venv/bin/pip install

.PHONY: run
run:
Expand All @@ -16,10 +17,10 @@ run:

.PHONY: dev
dev:
@mkdir -p .venv # ensure that pipenv sees .venv
$(PYTHON) -m pipenv install --dev
@rm -rf .venv && mkdir -p .venv # ensure that pipenv sees .venv
pipenv install --dev
.venv/bin/pre-commit install --install-hooks

.PHONY: upgrade-requirements
upgrade-requirements:
$(PYTHON) -m pipenv upgrade
pipenv upgrade
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ types-aiofiles = "*"
pre-commit = "*"

[requires]
python_version = "3.13"
python_version = "3.12"
205 changes: 103 additions & 102 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5cdd94b

Please sign in to comment.