Skip to content

Commit

Permalink
chore(py): Migrate all python packages to use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Dec 28, 2024
1 parent 883ef3b commit ed4aaf5
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 5,485 deletions.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ The docs are hosted on https://blockstream.github.io/greenlight/

## Contributing to the documentation

You must have a working installation of `python` and `poetry` to contribute to the docs.
You must have a working installation of `python` and `uv` to contribute to the docs.

To install dependencies make sure you are at the root of the repository

```
poetry install --with-only docs
uv sync --extra docs
```

To build the docs
Expand Down
1,199 changes: 0 additions & 1,199 deletions docs/poetry.lock

This file was deleted.

365 changes: 0 additions & 365 deletions examples/python/poetry.lock

This file was deleted.

18 changes: 10 additions & 8 deletions examples/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[tool.poetry]
[project]
name = "my-gl-example"
version = "0.1.0"
description = "An example application for greenlight that uses the gl-client library"
authors = []
license = "MIT"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"gl-client",
"pytest>=8.3.4",
]

[tool.poetry.dependencies]
gl-client = {path = "../../libs/gl-client-py"}
pytest = "^7.1.2"
python = ">=3.7,<4"
[tool.uv.sources]
gl-client = { workspace = true }
1 change: 1 addition & 0 deletions libs/cln-version-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cln_version_manager.egg-info/
47 changes: 25 additions & 22 deletions libs/cln-version-manager/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
[tool.poetry]
[project]
name = "cln-version-manager"
version = "0.1.1"
description = "A version manager for Core Lightning Binaries"
authors = ["Erik De Smedt <[email protected]>"]
license = "MIT"
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"

packages = [
{ include = "clnvm" },
authors = [
{ name = "Erik De Smedt", email = "[email protected]" },
]
dependencies = [
"click>=8.1.8",
"requests>=2.32.3",
]
[project.scripts]
clnvm = 'clnvm.cli:run'

[tool.poetry.dependencies]
python = "^3.8"
requests = "^2"
click = "^8"
[tool.uv]
dev-dependencies = [
"pytest>=8.3.4",
"types-click>=7.1.8",
"types-requests>=2.32.0.20241016",
]

[tool.poetry.group.dev.dependencies]
types-requests = "^2.31"
pytest = "^8"
mypy = "^1.8.0"
types-click = "^7"
black = "^24.2.0"
source = ['.']

[tool.poetry.group.lsp_ide.dependencies]
python-lsp-server = "^1.10.0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.poetry.scripts]
clnvm = "clnvm.cli:run"
[tool.hatch.build.targets.sdist]
ignore-vcs = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.hatch.build.targets.wheel]
packages = ["clnvm"]
1 change: 1 addition & 0 deletions libs/gl-client-py/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
gl_client.egg-info
index.node
poetry.lock
File renamed without changes.
56 changes: 14 additions & 42 deletions libs/gl-client-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,25 @@
[project]
name = "gl-client"

dependencies = [
"protobuf>=3",
"grpcio>=1.56",
"pyln-grpc-proto>=0.1",
]

[tool.poetry]
name = "gl-client"
version = "0.3.0"
description = ""
authors = ["Christian Decker <[email protected]>"]
license = "MIT"

packages = [
{ include = "glclient" },
description = "Greenlight Client Bindings for Python"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.7"
authors = [
{ name = "Christian Decker", email = "[email protected]" },
]

include = [
{ path = "glclient/*.pyi", format = ["wheel", "sdist"] },
{ path = "glclient/py.typed", format = ["wheel", "sdist"] },
dependencies = [
"protobuf>=5.29.2",
"pyln-grpc-proto>=24.2.1",
]

[tool.poetry.group.dev.dependencies]
black = "^23.1.0"
mypy-protobuf = "^3.5"
maturin = {version = ">=1.0,<1.3.2", extras = ["patchelf"]}
mypy = "^1.7.0"
grpcio-tools = "^1.67"

[tool.poetry.dependencies]
python = ">=3.8,<4"
grpcio = ">=1.67"
pyln-grpc-proto = ">=0.1.2,<1.2"
protobuf = ">=4"
maturin = ">=1.0"

[build-system]
requires = ["maturin>=1.0"]
build-backend = "maturin"

[tool.mypy]
exclude = [
'glclient/greenlight_pb2.py',
'glclient/scheduler_pb2.py',
'glclient/greenlight_pb2_grpc.py',
'glclient/scheduler_pb2_grpc.py',
[tool.uv]
dev-dependencies = [
"grpcio-tools>=1.68.1",
"maturin>=1.8.0",
"mypy-protobuf>=3.6.0",
]

[[tool.mypy.overrides]]
module = 'glclient'
Loading

0 comments on commit ed4aaf5

Please sign in to comment.