Closed althonos closed 10 months ago
Thanks very much @althonos !
@brentp : Can you make a new release so that this is fixed on PyPI as well? Thanks :pray:
can you show how I would do this? I've not kept up to date with python packaging and I get errors following the instructions I can see. (python setup.py sdist upload doesn't work)
Ah yes, you'd need to use twine
now, which can get a little more complicated since you also need to create an API token if you don't have one.
The other option is as I wrote earlier is to have a GitHub Actions that does this for you on every tagged commit, such as I have here, which also allows distribution of pre-compiled packages :smiley:
yes, I used twine and uploaded the dist, but as you'll see if you try to install the latest, it is (AFAICT) broken.
I'll see if I can copy your workflow
I'm having a look at the issue :+1:
no I'm stuck on this: https://github.com/brentp/fishers_exact_test/actions/runs/6148231983/job/16681512157#step:5:2 it's installing the fisher from pypi
Ah I think that's because versioneer
adds a local tag to the file and then pip
refuses to use it, try updating with --pre
:
python -m pip install --pre --no-binary fisher --find-links=dist fisher
Wow. I never would have figured this out.
Looks like it's working. I'll use this as a template for my other projects! Thanks very much. I'll make sure the wheels are updated by tomorrow if that part fails.
You'll need to add this repo as a trusted published on PyPI (https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/) so that it has the permission to upload the wheels :+1:
I think I had that set up correctly. It seems to be something with the tagging? https://github.com/brentp/fishers_exact_test/actions/runs/6148536650/job/16682799005
Ah yes it looks like versioneer
is not playing nice with cibuildwheel
This looks related: https://github.com/python-versioneer/python-versioneer/issues/206 Maybe try updating the checkout with:
- uses: actions/checkout@v3
with:
fetch-depth: 0
Hi @brentp !
This small PR adds a
pyproject.toml
file to the repository, which can be used to instructpip
about the required setup dependencies when buildingfisher
. This should fix #39, aspip
would be able to figure out the build dependencies in advance thanks to this metadata file.By the way, would you be interested in distributing wheels for the package? I would be happy to write a PR with GitHub Actions to compile the package for different targets using
cibuildwheel
, so that users don't have to compile on every install.