Skip to content

Commit

Permalink
feat: add python 3.12 support, later poetry support
Browse files Browse the repository at this point in the history
* update support range to 3.9 - 3.12
* update github tests accordingly
* (potentially) update poetry support range
  • Loading branch information
chadac committed Jun 1, 2024
1 parent d6c9be4 commit 927698b
Show file tree
Hide file tree
Showing 12 changed files with 1,074 additions and 1,061 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-2022, macos-12]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
poetry-version:
- "git+https://github.com/python-poetry/poetry.git"
runs-on: ${{ matrix.os }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-2022, macos-12]
python-version: ["3.7", "3.11"]
python-version: ["3.9", "3.12"]
poetry-version:
- "git+https://github.com/python-poetry/poetry.git"
- "poetry==1.2.0"
- "poetry==1.2.1"
- "poetry==1.3.0"
- "poetry==1.3.1"
- "poetry==1.4.2"
- "poetry==1.5.1"
- "poetry==1.6.1"
- "poetry==1.7.1"
- "poetry==1.8.3"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,46 +13,46 @@ repos:
- id: check-docstring-first

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-mock-methods
- id: python-use-type-annotations
- id: python-check-blanket-noqa

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
rev: v1.5.0
hooks:
- id: yesqa

- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
rev: v2.4.0
hooks:
- id: pycln
args: [--all]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
name: "isort"

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 7.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/pre-commit
rev: v2.20.0
rev: v3.7.1
hooks:
- id: validate_manifest
27 changes: 27 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
lib,
python3,
}:
python3.pkgs.buildPythonPackage {
pname = "poetry-plugin-pypi-proxy";
version = "0.1.3";

src = lib.cleanSource ./.;
format = "pyproject";

nativeBuildInputs = with python3.pkgs; [
poetry-core
];

propagatedBuildInputs = with python3.pkgs; [
];

checkInputs = with python3.pkgs; [
pytest
pytest-mock
wheel
pytest-httpserver
mypy
types-setuptools
];
}
74 changes: 74 additions & 0 deletions flake.lock

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

32 changes: 32 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
};

outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
perSystem = { pkgs, lib, ... }: let
pyVers = map (v: "python${v}") [ "39" "310" "311" "312" "313" ];
in rec {
packages = lib.listToAttrs (map
(python: {
name = "poetry-plugin-pypi-proxy-${python}";
value = pkgs.callPackage ./. { python3 = pkgs.${python}; };
})
pyVers
) // {
default = packages.poetry-plugin-pypi-proxy-python312;
};

devShells.default = let
in pkgs.mkShell {
packages = [ pkgs.python312 ] ++ (with pkgs; [
poetry
pre-commit
]);
};
};
};
}
Loading

0 comments on commit 927698b

Please sign in to comment.