Skip to content

Commit

Permalink
Move requirements to pyproject.toml (#502)
Browse files Browse the repository at this point in the history
* Move requirements to pyproject.toml

Set up enough of pyproject.toml to be valid as a project

We already effectively had a minimum python version of 3.9
(due to dependencies), this change merely denotes that.

regenerating `scripts/klippy-requirements.txt` and `scripts/requirements_dev.txt`
 can be done with
 `uv export -o scripts/klippy-requirements.txt --no-hashes` and
 `uv export -o scripts/requirements_dev.txt --no-hashes --dev-only`

* Set .python-version to 3.13

Add cffi and greenlet pins for 3.13

* feedback

---------

Co-authored-by: Rogerio Goncalves <[email protected]>
  • Loading branch information
kageurufu and rogerlz authored Jan 7, 2025
1 parent 750dc63 commit a6b7a38
Show file tree
Hide file tree
Showing 6 changed files with 824 additions and 23 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
4 changes: 2 additions & 2 deletions docs/_kalico/mkdocs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python virtualenv module requirements for mkdocs
jinja2==3.1.4
jinja2==3.1.5
mkdocs==1.6.0
mkdocs-material==9.5.23
mkdocs-simple-hooks==0.1.5
Expand All @@ -8,4 +8,4 @@ mdx-truly-sane-lists==1.3
mdx-breakless-lists==1.0.1
py-gfm==2.0.0
markdown==3.6
mkdocs-github-admonitions-plugin==0.0.3
mkdocs-github-admonitions-plugin==0.0.3
40 changes: 32 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
[project]
name = "Kalico"
version = "0.12.1"
requires-python = ">=3.9"
dependencies = [
"cffi==1.17.1 ; python_version >= '3.13'",
"cffi==1.15.1 ; python_version < '3.13'",
"greenlet==3.1 ; python_version >= '3.13'",
"greenlet==3.0.3 ; python_version == '3.12'",
"greenlet==2.0.2 ; python_version < '3.12'",
"Jinja2==3.1.5",
"markupsafe==2.1.5",
"numpy~=2.0 ; python_version=='3.9'",
"numpy~=2.2 ; python_version>='3.10'",
"pyserial==3.4",
"python-can==3.3.4",
]

[project.urls]
homepage = "https://kalico.gg/"
source = "https://github.com/KalicoCrew/kalico"
documentation = "https://docs.kalico.gg/"
issues = "https://github.com/KalicoCrew/kalico/issues"
funding = "https://docs.kalico.gg/Sponsors.html"

[tool.ruff]
line-length = 80
indent-width = 4
exclude = [
".github",
".history",
"config",
"docs",
"lib",
"src"
]
exclude = [".github", ".history", "config", "docs", "lib", "src"]

[tool.ruff.lint]
ignore = [
Expand All @@ -21,3 +39,9 @@ ignore = [
"F841", # Local variable name is assigned to but never used
"E721", # Do not compare types, use 'isinstance()'
]

[dependency-groups]
dev = [
"ruff>=0.8.4",
"pre-commit>=4.0.1",
]
25 changes: 15 additions & 10 deletions scripts/klippy-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# This file describes the Python virtualenv package requirements for
# the Klipper host software (Klippy). These package requirements are
# typically installed via the command:
# pip install -r klippy-requirements.txt
cffi==1.15.1
# This file was autogenerated by uv via the following command:
# uv export -o scripts/klippy-requirements.txt --no-dev --no-hashes
aenum==3.1.15
cffi==1.15.1 ; python_full_version < '3.13'
cffi==1.17.1 ; python_full_version >= '3.13'
greenlet==2.0.2 ; python_full_version < '3.12'
greenlet==3.0.3 ; python_full_version == '3.12.*'
greenlet==3.1.0 ; python_full_version >= '3.13'
jinja2==3.1.5
markupsafe==2.1.5
numpy==2.0.2 ; python_full_version < '3.10'
numpy==2.2.0 ; python_full_version >= '3.10'
pycparser==2.21
pyserial==3.4
greenlet==2.0.2 ; python_version < '3.12'
greenlet==3.0.3 ; python_version >= '3.12'
Jinja2==3.1.4
python-can==3.3.4
markupsafe==2.1.5
numpy==1.26.4
windows-curses==2.4.0 ; sys_platform == 'win32'
wrapt==1.16.0
15 changes: 12 additions & 3 deletions scripts/requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# This file describes the Python virtualenv package requirements for
# klipper CI checks and local development.
ruff==0.7.1
# This file was autogenerated by uv via the following command:
# uv export -o scripts/requirements_dev.txt --only-dev --no-hashes
cfgv==3.4.0
distlib==0.3.9
filelock==3.16.1
identify==2.6.5
nodeenv==1.9.1
platformdirs==4.3.6
pre-commit==4.0.1
pyyaml==6.0.2
ruff==0.8.4
virtualenv==20.28.1
Loading

0 comments on commit a6b7a38

Please sign in to comment.