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

PEP 621 compatible Python build? #7840

Open
mxlei01 opened this issue Jan 31, 2025 · 0 comments
Open

PEP 621 compatible Python build? #7840

mxlei01 opened this issue Jan 31, 2025 · 0 comments

Comments

@mxlei01
Copy link

mxlei01 commented Jan 31, 2025

libtorrent's pyproject.toml is missing version and name PEP-621 and this causes package managers such as uv for versions > 0.5.19 to fail.

If anybody uses uv and has boost-python installed, they can have a project pyproject.toml setup such as:

[project]
name = "test"
version = "0.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "libtorrent @ git+https://github.com/arvidn/[email protected]#subdirectory=bindings/python"
]

Then the command uv sync will automatically build libtorrent based on this git url + version.

With how libtorrent pyproject.toml is setup it will cause the build to fail on uv.

Build fails: `pyproject.toml` is using the [project] table, but the required project.name field is not set

The solution is pretty simple adding these two lines in pyproject.toml:

name = "libtorrent"
version = "2.0.10.1"

Example via: https://github.com/mxlei01/libtorrent/blob/v2.0.10.1/pyproject.toml

Just raising a potential issue, but the workaround is pretty simple by forking and editing the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant