chore: add pypi release#1931
Conversation
Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
|
@kemingy Ah that's great, thanks! So is there a linker error when using openSSL? I've started a PR to switch from openSSL to rustls. When we switch, we will also drop the Do you have any test runs of the workflow? Does it work already? Do you have examples on how to install and then use the package with Python? In |
|
Hi @thomas-zahner,
I have tried the release on https://github.com/kemingy/lychee/actions/runs/19575668669. It failed because of the OpenSSL. This can be fixed by installing the As a
The secret We can discuss about the name |
|
|
Signed-off-by: Keming <kemingy94@gmail.com>
|
I have changed the name to BTW, I have deleted the secret, so it will use the OIDC by default. Please add a trusted publisher according to the https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/ I'll change this to a draft until the rustls feature is ready. |
|
Thanks that sounds sensible 👍 |
- rm sccache since maturin-action is using the legacy pypi sccache Signed-off-by: Keming <kemingy94@gmail.com>
Signed-off-by: Keming <kemingy94@gmail.com>
|
Hi, since we now use the |
| subject-path: "wheels-*/*" | ||
| - name: Publish to PyPI | ||
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
| uses: PyO3/maturin-action@v1 |
There was a problem hiding this comment.
Where does the published artifact end up?
How does authentication work? Why can't anybody else push the same artifact and override ours? If I run maturin generate-ci github > .github/workflows/pypi.yml I get the additional lines below. (though I also get older version such as actions/upload-artifact@v4)
+ env:
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}There was a problem hiding this comment.
I need to delete the TOKEN to enable the PyPI OIDC. The way it verify is from the GitHub repo and workflow path configured in the PyPI. You can follow the instructions here: https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
There was a problem hiding this comment.
Ah I see, thank you. So did you follow these steps already? In other words, are we ready to merge and the workflow and deployment should be fully functional? Or should I/we follow these steps?
There was a problem hiding this comment.
I think mre or you should be the one that control the PyPI package of lychee-bin. Or maybe there should be a lychee org on the PyPI. I can help maintain the PyPI part.
So as long as we have setup the OIDC in the PyPI, we are able to publish lychee on it. This PR has done everything required from the code side (if I didn't miss anything).
There was a problem hiding this comment.
I've now requested the organisation lycheeverse on PyPI. I feel like you are the expert on this topic so I'd be glad if you could support us. In general we (the main lychee maintainers) don't really maintain the downstream packages. But we are of course responsible for the code in this repo and as the PyPI package seems to be fully generated from this workflow file we become responsible. So it seems like an organisation with you, Matthias and me makes sense.
I don't really understand yet how the new PyPI package would be used by users. Are bindings generated automatically for usage in Python code? What does the usage of this package look like? Could you create a minimal example repo using the new PyPI package? Is this possible before we release it?
There was a problem hiding this comment.
If there is still no update from the pypi for the organization, maybe I can add this to my pypi account, and invite the org as co-owner later?
There was a problem hiding this comment.
The org was created some time ago now: https://pypi.org/org/lycheeverse/
@kemingy @mre What are your PyPI account names? I'd like to add you to the organisation.
I've now tried to add a new pending publisher over at https://pypi.org/manage/organization/lycheeverse/publishing/
Unfortunately without success. I'm getting This publisher has already been registered in your organization. See your existing pending publishers below. even though the same page tells me No pending publishers are currently configured. Publishers for projects that don't exist yet can be added below.. This really makes no sense as far as I can tell.
Below is the form I've filled.
@kemingy Maybe you will have more luck trying to add the project? Or maybe this is a bug?
There was a problem hiding this comment.
Sorry, my bad, I added the project yesterday. I have removed it from my account. You shall be able to add it now @thomas-zahner. BTW my pypi account name is keming.
thomas-zahner
left a comment
There was a problem hiding this comment.
@kemingy Thanks for your efforts! Lets see if this works 🤞
|
The release on PyPI worked with v0.24.2 🎉 However |
Hi @thomas-zahner I have tested on Ubuntu22.04 (x86-64) & macOS 26 (arm64), both works. But I saw the size is strange here https://pypi.org/project/lychee-bin/#files. macOS and Windows releases are normal size but all the Linux releases are huge. I think it's because the debug info is not stripped in release Lines 8 to 9 in fabdcec What do you think? Shall we remove the debug info or just keep it there. |
|
Yeah, let's remove it. Would you like to create a PR? |
Sure! #2184 |

This is blocked by the rustls issue, tracked in #1721
❯ cargo tree --no-default-features --features rustls-tls --features email-check -i openssl openssl v0.10.73 └── native-tls v0.2.14 ├── async-native-tls v0.4.0 │ ├── async-smtp v0.6.0 │ │ └── check-if-email-exists v0.9.1 │ │ └── lychee-lib v0.21.0 (/home/user/GitHub/lychee/lychee-lib) │ │ ├── archive v0.1.0 (/home/user/GitHub/lychee/examples/archive) │ │ ├── benches v0.0.0 (/home/user/GitHub/lychee/benches) │ │ ├── builder v0.1.0 (/home/user/GitHub/lychee/examples/builder) │ │ ├── chain v0.1.0 (/home/user/GitHub/lychee/examples/chain) │ │ ├── client_pool v0.1.0 (/home/user/GitHub/lychee/examples/client_pool) │ │ ├── collect_links v0.1.0 (/home/user/GitHub/lychee/examples/collect_links) │ │ ├── extract v0.1.0 (/home/user/GitHub/lychee/examples/extract) │ │ ├── lychee v0.21.0 (/home/user/GitHub/lychee/lychee-bin) │ │ └── simple v0.1.0 (/home/user/GitHub/lychee/examples/simple) │ └── check-if-email-exists v0.9.1 (*) ├── hyper-tls v0.5.0 │ └── reqwest v0.11.27 │ ├── check-if-email-exists v0.9.1 (*) │ └── pwned v0.5.0 │ └── check-if-email-exists v0.9.1 (*) ├── hyper-tls v0.6.0 │ └── reqwest v0.12.24 │ ├── builder v0.1.0 (/home/user/GitHub/lychee/examples/builder) │ ├── chain v0.1.0 (/home/user/GitHub/lychee/examples/chain) │ ├── collect_links v0.1.0 (/home/user/GitHub/lychee/examples/collect_links) │ ├── lychee v0.21.0 (/home/user/GitHub/lychee/lychee-bin) │ ├── lychee-lib v0.21.0 (/home/user/GitHub/lychee/lychee-lib) (*) │ └── reqwest_cookie_store v0.9.0 │ ├── lychee v0.21.0 (/home/user/GitHub/lychee/lychee-bin) │ └── lychee-lib v0.21.0 (/home/user/GitHub/lychee/lychee-lib) (*) ├── reqwest v0.11.27 (*) ├── reqwest v0.12.24 (*) └── tokio-native-tls v0.3.1 ├── hyper-tls v0.5.0 (*) ├── hyper-tls v0.6.0 (*) ├── reqwest v0.11.27 (*) └── reqwest v0.12.24 (*)