chore: add pypi release
- Add PyPI release, as listed in https://github.com/lycheeverse/lychee/issues/59
This is blocked by the rustls issue, tracked in https://github.com/lycheeverse/lychee/issues/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 (*)
@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 rustls-tls feature as it will become either the default or maybe even the only option, dropping openSSL support.
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 Publish to PyPI there is secrets.PYPI_API_TOKEN do we need to create and add such a token before we are ready to merge? And what is the name/key of the published artifact? Is it lychee-cli from the pyproject.toml?
Hi @thomas-zahner,
So is there a linker error when using openSSL? I've https://github.com/lycheeverse/lychee/pull/1928 to switch from openSSL to rustls. When we switch, we will also drop the rustls-tls feature as it will become either the default or maybe even the only option, dropping openSSL support.
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 libssl-dev, I suppose (haven't tried). I prefer not to edit the yaml file since it's auto-generated by maturin. Since we already have the plan to make rustls as the default option.
As a bin type release, pip install lychee-cli (this name TBD) will place the binary (lychee) to local bin (very likely ~/.local/bin, but depends on which pip is used).
In Publish to PyPI there is secrets.PYPI_API_TOKEN do we need to create and add such a token before we are ready to merge? And what is the name/key of the published artifact? Is it lychee-cli from the pyproject.toml?
The secret secrets.PYPI_API_TOKEN is not mandatory. I would recommend to use OIDC, then we don't need the secret.
We can discuss about the name lychee-cli, as the name lychee has been taken years ago. You can verify the name from https://pypi.org/project/
lychee-cli seems fine. An alternative name might be lychee-bin, which is in alignment with the crate name. It has the added advantage that lychee-lib could be used as the canonical library name if we ever decide to release an "official" one. There already is https://github.com/jb--/lychpy, which we could adopt as well.
I have changed the name to lychee-bin. Tried to install OpenSSL to all the runners, but it's pretty troublesome. I would prefer to wait for the usable rustls feature :)
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 :+1: