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

setuptools using distutils issue with bugtrack_url #906

Closed
AraHaan opened this issue Dec 30, 2016 · 8 comments
Closed

setuptools using distutils issue with bugtrack_url #906

AraHaan opened this issue Dec 30, 2016 · 8 comments

Comments

@AraHaan
Copy link

AraHaan commented Dec 30, 2016

There is a problem when setuptools does this in 1 of the source files to define setup that is also exported from setuptools doing:

setup = distutils.core.setup

The problem with this is that bugtrack_url is not realized by distutils and the people who manage that thought this is an issue with setuptools which I ensured them it is not because doing:

from setuptools import setup

is the same as doing:

from distutils.core import setup

The issue from this that I also reported on the python bug tracker is here: http://bugs.python.org/issue29115 feel free to tell them that setuptools and distribute actually uses their distutils setup function.

But yeah using a package that defines bugtrack_url in their package generates this even if they are using setuptools because of the usage of distutils:

H:\Python\Python360\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url'
  warnings.warn(msg)

I would like if setuptools took the actual setup function from distutils instead of doing:

setup = distutils.core.setup

So that way setuptools can fix this bug as the standard library devs that manage distutils are too lazy to fix it themselves.

The reason why I have to use bugtrack_url is so my package would have a known bug track url on pypi.python.org. I also have another package that has one back when I could override it online manually but I can only do so much to bypass this and now there is no way I can edit it online on the package itself without having to worry about this stupid warning that literally discards the bugtrack_url option. So please fix this by NOT using the distutils setup function and instead copying that code over to setuptools and then make it able to know about bugtrack_url. That other package that defines the bug track url is no longer valid and must so I must change the bug track url option sadly setuptools has the problem with discarding it all because of distutils.

@berkerpeksag
Copy link
Member

This is a duplicate of #29.

@AraHaan
Copy link
Author

AraHaan commented Dec 30, 2016

So, basically we have to monkey patch distutils.core.Distribution to actually add that option in. hmm

@jaraco
Copy link
Member

jaraco commented Dec 31, 2016

Reading the upstream ticket, it appears that bugtrack_url isn't a suppported parameter.

There isn't anything we can do about this in the Python stdlib and neither can setuptools (except write a filter for it).
It's probably best to let the package authors still using the keyword know that they have to remove the keyword settings from their setup.py.

If the field is something that should be included in package metadata, and the community has agreed on how (e.g. Through a pep), then it could and should be added as an option.

Note that distribution keywords is something that setup tools implements through entry points so it may also be possible for a third party to implement the desired behavior. Though I am on cold medicine, so take that not as a recommendation.

@jaraco jaraco closed this as completed Dec 31, 2016
@AraHaan
Copy link
Author

AraHaan commented Dec 31, 2016

I need to be able to get the bugtrack_url on it or change it in one of my packages which I will now link: https://pypi.python.org/pypi/TinyURL3.

There is no other WAY possible right now. Not even in any of the tools unless I manually go in and HACK the PKG-INFO file and risk corrupting it at the same time. So this is needed.

@jaraco
Copy link
Member

jaraco commented Dec 31, 2016

More history: https://twitter.com/dstufft/status/274407214830190592

Looks like you can edit the field manually in PyPI. I suggest deleting it and forget it ever existed.

@AraHaan
Copy link
Author

AraHaan commented Dec 31, 2016

Was*, cant do it anymore. If you try it will link you to a page to force you to upload a PKG-INFO file like I said before.

@AraHaan
Copy link
Author

AraHaan commented Jan 1, 2017

Ok, they are working on the issue with unable to edit packages on pypi itself, turns out it was an regression and only I noticed it until I opened a bug report to them and they checked it out to see and sure enough they might try to fix it.

@jaraco
Copy link
Member

jaraco commented Jan 1, 2017

That's good to hear!

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

3 participants