Skip to content

Commit 3019801

Browse files
committed
Plugins: poetry -> uv
1 parent 4e0782f commit 3019801

File tree

8 files changed

+76
-79
lines changed

8 files changed

+76
-79
lines changed

docs/configuration/examples.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ _Experimental setting_: behavior and api is subject to change until stable.
416416
Omit sending {kbd}`enter` to key commands. Equivalent to having
417417
a [`time.sleep`](time.sleep) before and after [`send_keys`](libtmux.Pane.send_keys).
418418

419-
This is especially useful for expensive commands where the terminal needs some breathing room (virtualenv, poetry, pipenv, sourcing a configuration, launching a tui app, etc).
419+
This is especially useful for expensive commands where the terminal needs some breathing room (virtualenv, poetry, pipenv, uv, sourcing a configuration, launching a tui app, etc).
420420

421421
````{tab} Virtualenv
422422
@@ -740,7 +740,7 @@ the workspace file / project root.
740740

741741
:::
742742

743-
If you use [pipenv][pipenv] / [poetry][poetry], you can use a script like this to ensure
743+
If you use [pipenv] / [poetry] / [uv], you can use a script like this to ensure
744744
your packages are installed:
745745

746746
````{tab} YAML
@@ -784,6 +784,7 @@ windows:
784784

785785
[pipenv]: https://docs.pipenv.org/
786786
[poetry]: https://python-poetry.org/
787+
[uv]: https://github.com/astral-sh/uv
787788

788789
## Kung fu
789790

docs/plugins/index.md

+13-17
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ your tmuxp workspace file.
3030
3131
````
3232

33-
[poetry]: https://python-poetry.org/
34-
3533
## Developing a Plugin
3634

3735
tmuxp expects all plugins to be class within a python submodule named
3836
`plugin` that is within a python module that is installed in the local
3937
python environment. A plugin interface is provided by tmuxp to inherit.
4038

41-
[poetry][poetry] is the chosen python package manager for tmuxp. It is highly
39+
[uv] is the chosen python package manager for tmuxp. It is highly
4240
suggested to use it when developing plugins; however, `pip` will work
4341
just as well. Only one of the configuration files is needed for the packaging
4442
tool that the package developer decides to use.
@@ -49,37 +47,33 @@ python_module
4947
├── tmuxp_plugin_my_plugin_module
5048
│   ├── __init__.py
5149
│   └── plugin.py
52-
├── pyproject.toml # Poetry's module configuration file
53-
└── setup.py # pip's module configuration file
50+
└── pyproject.toml # Python project configuration file
5451

5552
```
5653

5754
When publishing plugins to pypi, tmuxp advocates for standardized naming:
5855
`tmuxp-plugin-{your-plugin-name}` to allow for easier searching. To create a
59-
module configuration file with poetry, run `poetry init` in the module
56+
module configuration file with uv, run `uv virtualenv` in the module
6057
directory. The resulting file looks something like this:
6158

6259
```toml
6360

64-
[tool.poetry]
61+
[project]
6562
name = "tmuxp-plugin-my-tmuxp-plugin"
6663
version = "0.0.2"
6764
description = "An example tmuxp plugin."
6865
authors = ["Author Name <author.name@<domain>.com>"]
69-
70-
[tool.poetry.dependencies]
71-
python = "^3.6"
72-
tmuxp = "^1.6.0"
73-
74-
[tool.poetry.dev-dependencies]
66+
requires-python = ">=3.8,<4.0"
67+
dependencies = [
68+
"tmuxp^=1.7.0"
69+
]
7570

7671
[build-system]
77-
requires = ["poetry>=0.12"]
78-
build-backend = "poetry.masonry.api"
79-
72+
requires = ["hatchling"]
73+
build-backend = "hatchling.build"
8074
```
8175

82-
The {}`plugin.py` file could contain something like the following:
76+
The `plugin.py` file could contain something like the following:
8377

8478
```python
8579

@@ -147,3 +141,5 @@ plugins:
147141
```{eval-rst}
148142
.. automethod:: tmuxp.plugin.TmuxpPlugin.reattach
149143
```
144+
145+
[uv]: https://github.com/astral-sh/uv
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_awf"
33
version = "0.0.2"
44
description = "A tmuxp plugin to test after_window_finished part of the tmuxp plugin system"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_bs"
33
version = "0.0.2"
44
description = "A tmuxp plugin to test before_script part of the tmuxp plugin system"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_bwb"
33
version = "0.0.2"
44
description = "A tmuxp plugin to test before_workspace_build part of the tmuxp plugin system"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_fail"
33
version = "0.1.0"
44
description = "A test plugin designed to fail to test the cli"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_owc"
33
version = "0.0.2"
44
description = "A tmuxp plugin to test on_window_create part of the tmuxp plugin system"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[tool.poetry]
1+
[project]
22
name = "tmuxp_test_plugin_r"
33
version = "0.0.2"
44
description = "A tmuxp plugin to test reattach part of the tmuxp plugin system"
5-
authors = ["Joseph Flinn <[email protected]>"]
6-
7-
[tool.poetry.dependencies]
8-
python = "^3.6"
9-
tmuxp = "^1.7.0"
10-
11-
[tool.poetry.dev-dependencies]
5+
authors = [
6+
{name = "Joseph Flinn", email = "[email protected]"}
7+
]
8+
requires-python = ">=3.8,<4.0"
9+
dependencies = [
10+
"tmuxp>=1.7.0"
11+
]
1212

1313
[build-system]
14-
requires = ["poetry>=0.12"]
15-
build-backend = "poetry.masonry.api"
14+
requires = ["hatchling"]
15+
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)