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

Add a nice way of editing auto-generated installation instructions on PyPi packages. #33787

Open
Grausiga opened this issue Mar 4, 2025 · 2 comments
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Grausiga
Copy link

Grausiga commented Mar 4, 2025

Feature Description

I would like the ability to change the generated installation instructions, as using them directly does not work in my case, as the package in question relies on other packages it must find on PyPi and using:

pip install --index-url https://url/to/my/instance/ package-name

Will correctly install the base package but fail to install its dependencies defined in its pyproject.toml, with pip stating it cannot find matching distributions for them as it is searching only on the given URL. Adding PyPi's URL as --extra-index-url before the package name resolves this for example and I would like that to be stated in its installation instructions or even change them all together, etc.

Screenshots

No response

@Grausiga Grausiga added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Mar 4, 2025
@Grausiga Grausiga changed the title Add nice way of editing of auto-generated installation instructions on PyPi packages. Add a nice way of editing auto-generated installation instructions on PyPi packages. Mar 4, 2025
@wxiaoguang
Copy link
Contributor

Could you provide some formal commands and/or code? Then we could update this tmpl file:

https://github.com/go-gitea/gitea/blob/main/templates/package/content/pypi.tmpl#L7

@Grausiga
Copy link
Author

Grausiga commented Mar 7, 2025

It could be that I use it wrongly, but what works for me is:

pip install --index-url https://my/gitea/instance/api/packages/pypi/simple --extra-index-url https://pypi.org/simple package

This then installs my package from my gitea instance and then pulls its dependencies from pypi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants