Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update setup.py DOWNLOAD_URL #8205

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

Closed
wants to merge 1 commit into from

Conversation

NickGoumas
Copy link

@NickGoumas NickGoumas commented Jan 15, 2017

Changed the DOWNLOAD_URL string from the out of date SourceForge link to the current GitHub link. Fix #8184.

Reference Issue

What does this implement/fix? Explain your changes.

setup.py DOWNLOAD_URL is currently set to the out-of-date sourceforge link. This PR is updating that to the current GitHub link.

Any other comments?

Changed the DOWNLOAD_URL string from the out of date SourceForge link to the current GitHub link.
@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Jan 15, 2017 via email

@NickGoumas
Copy link
Author

Oh I'm not sure. As long as it's up to date I'm indifferent.

@GaelVaroquaux
Copy link
Member

I think that I would prefer the pypi URL.

Let's see what others say.
Cc @ogrisel @amueller

@lesteve
Copy link
Member

lesteve commented Jan 16, 2017

@NickGoumas, please remember to mention the associated issue in your PR description (I edited the PR for you this time). The best is to use "Fix #issueNumber", this way the issue gets closed automatically when the PR is merged.

@lesteve
Copy link
Member

lesteve commented Jan 16, 2017

@GaelVaroquaux look at the associated issue. The link appears on PyPI so that would point to the page you are already in. To be honest I am not sure what DOWNLOAD_URL is supposed to be.

@lesteve
Copy link
Member

lesteve commented Jan 16, 2017

As I said in the associated issue, it would be great to get rid of all the outdated sourceforge links across the whole code base.

@lesteve
Copy link
Member

lesteve commented Jan 16, 2017

For the record download_url is not used in PyPA setup.py so maybe we can remove it.

@nelson-liu
Copy link
Contributor

fwiw from when i edited the releases link in the README (#7637 (comment))

I think pypi should be the ultimate source for releases, not github. - @amueller

if we decide github should be the source for releases, maybe edit the readme as well?

@jakirkham
Copy link
Contributor

FWIW if you do decide GitHub, would recommend creating your own tarball and adding it to the published tags and have the URL point to that. The reason I suggest this is we learned at conda-forge last summer that GitHub generates their tarballs on the fly. So if the process for generating them changes, so does the checksum. This has happened a couple times to us in the last year and started occurring to us this year too. 😞 Publishing your own tarballs on GitHub would avoid this issue. Alternatively using PyPI avoids this issue as well.

@lesteve
Copy link
Member

lesteve commented Jan 18, 2017

I am in favour of using PyPI and removing the DOWNLOAD_URL from setup.py unless someone sees a good reason to keep it there.

@dalmia
Copy link
Contributor

dalmia commented Feb 1, 2017

@NickGoumas are you still working on this?

@NickGoumas
Copy link
Author

@lesteve Is the consensus we just want to remove the DOWNLOAD_URL ?

@lesteve
Copy link
Member

lesteve commented Feb 1, 2017

@lesteve Is the consensus we just want to remove the DOWNLOAD_URL ?

Nobody strongly complained, so I guess so.

@lesteve
Copy link
Member

lesteve commented Feb 1, 2017

Ideally:

  • somebody would double-check that a setup.py without DOWNLOAD_URL is perfectly valid, for example from the distutils and/or setuptools documentation
  • it would be great to remove all the links pointing from sourceforge as it was mentioned in the associated issue

@shubham0704
Copy link

In the documentation for setup.py configuration its written that download_url .For conforming this I saw this blog-http://peterdowns.com/posts/first-time-with-pypi.html and also the official disutil documentation - https://setuptools.readthedocs.io/en/latest/setuptools.html. The mechanism they say is that it is one of primary parameters.
Usage:(from setuptool page)
download_url and url:
These become links on your project’s PyPI page. EasyInstall will examine them to see if they link to a package (“primary links”), or whether they are HTML pages. If they’re HTML pages, EasyInstall scans all HREF’s on the page for primary links.

When making a package and uploading it to pypi in the setup.py of package we must use the parameter ###The download_url is a link to a hosted file with your repository's code. Github will host this for you, but only if you create a git tag

tl;dr:
If you want it to download the tarball from github or sourceforge use download_url otherwise not needed.I saw the last official reference.https://pythonhosted.org/an_example_pypi_project/setuptools.html.
So please tell I will be happy to provide a pr based on your decision.

@lesteve
Copy link
Member

lesteve commented Feb 28, 2017

Thanks for taking a stab at this one. Because things have changed quite a bit in the past few years with python packaging, I think the most convincing thing to do would be to:

  • remove download_url from setup.py. Rename the package name in setup.py to something like my-scikit-learn-test while you are doing your tests.
  • test that you can upload the package to testpypi.python.org (I think -r option in python setup.py may be enough but I haven't tested it)
  • test that you can pip install from testpypi.python.org (with -i option in pip install)

@shubham0704
Copy link

@lesteve I have tested we can upload successfully but when we install I am getting error:
image

Error generated:
image

@nelson-liu
Copy link
Contributor

@shubham0704 did you install numpy?

@shubham0704
Copy link

shubham0704 commented Mar 4, 2017

Oh my bad. But is there a provision to download required dependencies if not detected in the system. Like I used to make a requirements file while hosting a website -@nelson-liu.(I assumed that way)
I put this inside a virtual-env.
I will try installing all the dependencies and then try reporting a problem if any.Thanks

@shubham0704
Copy link

No errors after installing scipy and numpy:
image

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 this pull request may close these issues.

PyPI links to sourceforge instead of github
7 participants