pimoroni / pimoroni-pico-stubs

10 stars 1 forks source link

Build with poetry failing #12

Open Gadgetoid opened 4 months ago

Gadgetoid commented 4 months ago

"poetry" fails with:

poetry build
Building pimoroni-pico-stubs (1.21.0)
  - Building sdist

adcfft.pyi is not a package.

It looks like pyproject.toml should include pimoroni-pico-stubs as a package, and the stubs subfolder should be renamed to pimoroni-pico-stubs. Poetry uses the -stubs suffix to identify stubs-only packages.

Additionally, the requirements.txt mentioned in the PUBLISH.md is missing.

North101 commented 4 months ago

I'll have a look into this later tonight.

Gadgetoid commented 4 months ago

I think I've figured it out. And published the package 🥳

Gadgetoid commented 4 months ago

Leaving this open in case you get a chance to confirm I'm not barking up the wrong tree, but I fixed up the package - via a bunch of trial and error 😆 - to be compatible with what I assume are recent Poetry versions efforts to be helpful.

Pushed up to PyPI, though I have not taken much care about the version yet.

Would be nice to get the package building in CI here, too!

North101 commented 4 months ago

Gave it a quick test while following the instructions and its working!

Theres a guide here for automatic publishing when pushing a tag: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

Gadgetoid commented 4 months ago

Ooooh, Trusted Publishing is new to me. I've got a bunch of PyPI packages that build/test on CI but always avoided automatic publishing for the mentioned security reasons. Knowing me, Trusted Publishing has probably been a thing for 5 years now 😆

Thanks for giving the package a try, I'll look into this when I get a bunch more time!