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

Disabling upload per-project #278

Closed
cadojo opened this issue Jun 14, 2022 · 3 comments · Fixed by #340
Closed

Disabling upload per-project #278

cadojo opened this issue Jun 14, 2022 · 3 comments · Fixed by #340

Comments

@cadojo
Copy link

cadojo commented Jun 14, 2022

For private package development, I've always been afraid of twine and similar tools' "by-default" behavior when it comes to publishing packages. I love the hatch version ... syntax, and the easy and fast builds and plugins, so I'd to have it as an option for in-house standard builds.

Is there any way to remove the default repository URL for hatch on a per-project basis? Something in pyproject.toml to specify the repository URL, so it isn't the public PyPi?

I know I can do so via the user config file, as described here, but I'd ideally like to specify this for every project, so someone would have to edit the config file or supply a command-line argument to upload to PyPi.

Is this supported?

@ofek
Copy link
Collaborator

ofek commented Jun 14, 2022

Hey! You can do pypi/warehouse#5440

[project]
...
classifiers = [
    "Private :: Do Not Upload",
]

@cadojo
Copy link
Author

cadojo commented Jun 14, 2022

Yes I have that too! I do think that still "sends bits" to pypi.org, no? And then PyPi sees the classifier, and rejects it?

I know that's splitting hairs, but if I'm correct about that logic, I'd ideally want something to prevent hatch upload from defaulting to pypi at all. Something like overloading the main and test names to my own, internal servers.

It seems like that specific case isn't supported, so if my Private :: classifier understanding is correct, would writing my own plugin be a good place to start? Could I overwrite upload in my own plugin, maybe?

@ofek
Copy link
Collaborator

ofek commented Jul 10, 2022

fyi #342

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

Successfully merging a pull request may close this issue.

2 participants