Dan Hipschman
1 min readMar 30, 2022

--

Hey Steven,

This is a great question! We have a script that publishes internal libraries. It basically does as you say, and creates a second, temporary pyproject.toml on the fly. There's no need to maintain a second file, since it's auto-generated.

I got permission to simply share this script, so you can see how it works and feel free to reuse it: https://gist.github.com/dan-hipschman/070318806610727f17b2d6616ceaa4cc

As an example, the library's pyproject.toml might look like this:

[tool.poetry]

name = "opendoor.grpc"

version = "1.13"

...

[tool.poetry.dependencies]

python = "^3.6"

"opendoor.monitor" = {path = "../monitor", develop = true}

"opendoor.rbac" = {path = "../rbac", develop = true}

...

The script will replace this with a new temporary pyproject.toml that looks something like the following, then publish it, and delete the temp file:

[tool.poetry]

name = "opendoor.grpc"

version = "1.13.20220330000000"

...

[tool.poetry.dependencies]

python = "^3.6"

"opendoor.monitor" = ">=1.2,<1.3"

"opendoor.rbac" = ">=2.4,<2.5"

...

Where it pulls the internal dependency versions from their respective pyproject.toml files.

Hope that helps!

--

--