Closed BrianPugh closed 1 year ago
Poetry itself doesn't actually use the build-system
config of the active project. The build-system
is used in other commands like pip install .
, but the Poetry CLI deliberately ignores it. Source: https://github.com/python-poetry/poetry/issues/6154#issuecomment-1218493969
Gotcha, thanks for the clarification! This also explains why CIBuildWheel would correctly install poetry-dynamic-versioning. Thank you!
Hi, I am having this same issue. What would be the best way of action for building the packages inside of github actions?
for a standard, pure python package, you can reference my github actions pipeline here:
https://github.com/BrianPugh/python-template/blob/main/.github/workflows/deploy.yaml
If you have dependencies that need to be compiled, you can check out my much more complicated pipeline here:
https://github.com/BrianPugh/python-template/blob/main/.github/workflows/build_wheels.yaml
Hi, thanks for the reference action. It is now working! https://github.com/Dioptas/Dioptas/blob/develop/.github/workflows/CD.yml
The main thing i needed to add was this:
- name: Add Dynamic Versioning Plugin
run: |
poetry self add poetry-dynamic-versioning[plugin]
before building. Installing dependencies is not required for building.
Currently, I'm trying to run
poetry build --format=sdist
in a github action, but the resulting tar.gz file has version0.0.0
. This is right after installing via snok/install-poetry. Point is, this is from a very clean poetry installation (I am also able to reproduce in a docker container).My
pyproject.toml
contains:I would expect for the poetry build-system (or is actually upstream to poetry?) to install poetry-dynamic-versioning for me since it's listed in
requires
. If I explicitly install poetry-dynamic-versioning (admittedly, as the README says to do), then run my build command, everything is fine:Is this working-as-intended, a bug, or an upstream issue? Thanks!
Poetry version: 1.5.1 (latest)