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

How to set download_url inside setup.py file when it requires the tag? #95

Closed
odinho opened this issue Aug 15, 2016 · 9 comments
Closed
Labels

Comments

@odinho
Copy link

odinho commented Aug 15, 2016

Hello, I have a setup.py that looks something like this (for fictional project myname):

setup(
    name='myname',
    use_scm_version=True,
    download_url='https://github.com/odinho/myname/tarball/v0.5.1',
    ...

The v0.5.1 is what I use to tag it as version 0.5.1.

I found out when making a release that I couldn't easily have all the data in just the tag, because I get this problem of needing the version number in other fields in the setup.py. Here for the download URL for saying where people can get this source.

I will remove this download_url or link it just to the git clone, which will give them the repo with the tag. But it'd be interesting to know whether there was any other way to solve the issue? It could simply be it makes little sense, only the actual tag can be used, since the version number generated would surely not work for all other cases than just the exact release.

@untitaker
Copy link
Contributor

Why do you want to set this URL in the first place?

@RonnyPfannschmidt
Copy link
Contributor

https://github.com/Changaco/setuptools_scm_git_archive fixes the issue for abusing github tags for releases

please consider pypi or a devpi instance to publish annotated sdists and wheels alongside

@RonnyPfannschmidt
Copy link
Contributor

also see the travis.yml of setuptools_scm itself for a way to automate releases on tags

@RonnyPfannschmidt
Copy link
Contributor

please close if the answer is sufficient

@odinho
Copy link
Author

odinho commented Aug 15, 2016

I am already publishing to pypi, both wheels and sdist's. But I merely want to fill in all the metadata fields, and one of those is the download_url.

Just not having that field is a possible fix too.

I asked the question because I couldn't find any other questions/answers about this subject. So now there is.

@odinho odinho closed this as completed Aug 15, 2016
@untitaker
Copy link
Contributor

FWIW I've never seen this field filled out in practice.

@RonnyPfannschmidt
Copy link
Contributor

@odinho the download_url field no longer makes sense as pypi metadata, as external downloads got removed due to regular missuse and issues

@odinho
Copy link
Author

odinho commented Aug 15, 2016

Okay, awesome :) I've removed it.

Maybe it'd be helpful with a note about that in the pypa docs. Not sure how many don't know this like me though, but it's not fully obvious how to use that field (or not use it) for people new to python packaging.

@RonnyPfannschmidt
Copy link
Contributor

@odinho please report an issue at that repo and/or open a pr, its a volunteer effort largely ^^

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

No branches or pull requests

3 participants