Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add entry_points to setup.py to permit tool installation #345

Closed
mike-hart opened this issue Mar 28, 2025 · 2 comments
Closed

Please add entry_points to setup.py to permit tool installation #345

mike-hart opened this issue Mar 28, 2025 · 2 comments

Comments

@mike-hart
Copy link

By adding entry_points we would have an installable tool which, when run, provides a path to recent/modern certs.

This would mean tools like pipx or uv could be used to install it and it's especially useful on older platforms that frequently maintain. The alternative is for me to set aside and manually manage virtualenvs on these platforms. I'd much prefer to be able to uv tool install certifi and export SSL_CERT_FILE=$(certifi) than a more involved process.

@sigmavirus24
Copy link
Member

This is an xyproblem.info kind of request which makes it most likely for someone to say no to.

You've made vague mentions of the problem(s) your trying to solve without concrete examples or mention of what you're doing instead. You also haven't explained why something as simple as python -m certifi or python -c 'import certifi; print(certifi.where())' is unacceptable which works today on any reasonably recent version of certifi.

As such I'm closing this as not planned.

@sigmavirus24 sigmavirus24 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2025
@mike-hart
Copy link
Author

I appreciate the response, and understand why this might be closed, so I feel I should qualify.

The request was triggered by an install of a recent Python via uv on an ancient/unsupported linux instance (so old that more recent 3.x pyenv installs won't work due to an unsupported version of libssl.so without building a separate one and modifying the build args to suit).
Trying to use urllib.request on the new install results in "unable to get local issuer certificate" exceptions. To work around this I needed to setup an SSL_CERT_FILE env var to a more recent set of CA certs. This can (as you indicate) be achieved by doing /path/to/certifi/venv/bin/python -m certifi, but the setup is then creating and maintaining a venv and keeping track of where it lives. Or, nicer, would be uv tool install certifi which can then be easily upgraded and the part missing from certifi is the entry_points (since there's already a __main__ which provides the root of the functionality it would use).

Perhaps this was driven by my frustration of needing to work around old boxes, the request initially felt more minimal than I might appreciate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants