core-lightning/contrib/pyln-proto/pyproject.toml
Christian Decker 92f10f2c34 pyln: Fix relative path dependencies when publishing to PyPI
So this was quite a journey:

 - We want relative depdendencies (using the `path` argument) whenever
   developing locally. Otherwise we would have to install each
   dependency every time we change a single character, which
   undoubtedly would cause us to waste time trying to debug an issue
   just because we forgot to install.
 - When publishing however we want to rely on the version number,
   since the repo context gets lost upon publishing, and path
   dependencies cause failures.

The solution then it seems is to use `dev-dependencies` (not that
surprising once you find it) with relative paths, so that `poetry
install` uses these over the normal dependencies (no idea how they
dedup them) and use `dependencies` when publishing. The paths are
still in there when publishing, but `pip install` ignores them.

I checked that `poetry install` from an unrelated project doesn't
accidentally use the path dependencies, even when adding them as
dev-dependencies. This should hopefully also allow installing them
as a repo link, though I can't test that right now.
2022-06-26 13:54:01 +09:30

27 lines
738 B
TOML

[tool.poetry]
name = "pyln-proto"
version = "0.11.1"
description = "This package implements some of the Lightning Network protocol in pure python. It is intended for protocol testing and some minor tooling only. It is not deemed secure enough to handle any amount of real funds (you have been warned!)."
authors = ["Christian Decker <decker.christian@gmail.com>"]
license = "BSD-MIT"
readme = "README.md"
packages = [
{ include = "pyln/proto" },
]
[tool.poetry.dependencies]
python = "^3.7"
base58 = "^2.1.1"
bitstring = "^3.1.9"
coincurve = "^17.0.0"
cryptography = "^36.0.1"
PySocks = "^1.7.1"
[tool.poetry.dev-dependencies]
pytest = "^7"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"