Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv for virtualenv and pip when available #192

Merged
merged 10 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [macOS-latest, ubuntu-latest, windows-latest]

env:
UV_SYSTEM_PYTHON: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: hynek/setup-cached-uv@v2
with:
cache-dependency-path: pyproject.toml
- name: Install
run: |
python -m pip install --upgrade pip
make EXTRAS=dev install
run: make EXTRAS=dev install
- name: Test
run: make test
- name: Lint
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Preparation

You'll need to have Python 3.6 available for testing.
You'll need to have Python 3.8 or newer available for testing.
I recommend using [pyenv][] for this:

$ pyenv install 3.6.5
$ pyenv shell 3.6.5
$ pyenv install 3.12
$ pyenv shell 3.12


## Setup
Expand All @@ -28,6 +28,6 @@ that you have done the following:
* Added appropriate license headers to new files
* Written or modified tests for new functionality
* Used `make format` to format code appropriately
* Validated and tested code with `make lint test`
* Validated and tested code with `make test lint`

[pyenv]: https://github.com/pyenv/pyenv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Implementation of itertools, builtins, and more for AsyncIO and mixed-type itera
Install
-------

aioitertools requires Python 3.6 or newer.
aioitertools requires Python 3.8 or newer.
You can install it from PyPI:

$ pip install aioitertools
Expand Down
17 changes: 13 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
PKG:=aioitertools
EXTRAS:=dev,docs

UV_VERSION:=$(shell uv --version)
ifdef UV_VERSION
VENV:=uv venv
PIP:=uv pip
else
VENV:=python -m venv
PIP:=python -m pip
endif

.venv:
python -m venv .venv
source .venv/bin/activate && make install
echo 'run `source .venv/bin/activate` to use virtualenv'
$(VENV) .venv

venv: .venv
source .venv/bin/activate && make install
echo 'run `source .venv/bin/activate` to use virtualenv'

install:
python -m pip install -Ue .[$(EXTRAS)]
$(PIP) install -Ue .[$(EXTRAS)]

release: lint test clean
flit publish
Expand Down
Loading