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

--no-binary can't be specified in the config file. #2867

Closed
tomprince opened this Issue Jun 3, 2015 · 11 comments

Comments

Projects
None yet
4 participants
@tomprince

tomprince commented Jun 3, 2015

[global]
no-binary = bitmath

gives

Exception:
Traceback (most recent call last):
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/commands/install.py", line 291, in run
    wb.build(autobuilding=True)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/wheel.py", line 705, in build
    self.requirement_set.prepare_files(self.finder)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/req/req_set.py", line 317, in prepare_files
    functools.partial(self._prepare_file, finder))
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/req/req_set.py", line 304, in _walk_req_to_install
    more_reqs = handler(req_to_install)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/req/req_set.py", line 439, in _prepare_file
    req_to_install.populate_link(finder, self.upgrade)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/req/req_install.py", line 244, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/index.py", line 486, in find_requirement
    all_versions = self._find_all_versions(req.name)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/index.py", line 435, in _find_all_versions
    formats = fmt_ctl_formats(self.format_control, canonical_name)
  File "/Users/cougar/dev/flocker/lib/python2.7/site-packages/pip/index.py", line 1260, in fmt_ctl_formats
    if canonical_name in fmt_ctl.only_binary:
AttributeError: 'str' object has no attribute 'only_binary
@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jun 5, 2015

My work-around for pip 7.0 (because pip automatically creates wheels from sdists) is to include this in setup.py:

if 'bdist_wheel' in sys.argv:
    raise RuntimeError("This setup.py does not support wheels")

benjaoming commented Jun 5, 2015

My work-around for pip 7.0 (because pip automatically creates wheels from sdists) is to include this in setup.py:

if 'bdist_wheel' in sys.argv:
    raise RuntimeError("This setup.py does not support wheels")
@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jun 5, 2015

But I agree, this should be a configurable option..

benjaoming commented Jun 5, 2015

But I agree, this should be a configurable option..

@tomprince

This comment has been minimized.

Show comment
Hide comment
@tomprince

tomprince Jun 5, 2015

That only works if you control the package in question.

tomprince commented Jun 5, 2015

That only works if you control the package in question.

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Jun 5, 2015

Member

@rbtcollins might have an idea about how to fix this, if not I'll poke at it.

Member

dstufft commented Jun 5, 2015

@rbtcollins might have an idea about how to fix this, if not I'll poke at it.

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jun 5, 2015

@tomprince true that, btw. I needed this because it can't be specified in a package's setup.cfg neither.

benjaoming commented Jun 5, 2015

@tomprince true that, btw. I needed this because it can't be specified in a package's setup.cfg neither.

@rbtcollins

This comment has been minimized.

Show comment
Hide comment
@rbtcollins

rbtcollins Jun 5, 2015

Contributor

Huh, yes we need a tweak to the config setting thunks there.

Contributor

rbtcollins commented Jun 5, 2015

Huh, yes we need a tweak to the config setting thunks there.

@rbtcollins

This comment has been minimized.

Show comment
Hide comment
@rbtcollins

rbtcollins Jun 5, 2015

Contributor

Packages that can't build correct wheels should indeed cripple bdist_wheel - its not a workaround, its correct behaviour.

But we also need to let folk control through their' pip conf.

Contributor

rbtcollins commented Jun 5, 2015

Packages that can't build correct wheels should indeed cripple bdist_wheel - its not a workaround, its correct behaviour.

But we also need to let folk control through their' pip conf.

@tomprince

This comment has been minimized.

Show comment
Hide comment
@tomprince

tomprince Jun 6, 2015

In fact, in my case, it isn't that the packge does work via wheel (I don't think), but that it generates a wheel with an version that doesn't match the setuptool==3.6 (which we use due reasons).

tomprince commented Jun 6, 2015

In fact, in my case, it isn't that the packge does work via wheel (I don't think), but that it generates a wheel with an version that doesn't match the setuptool==3.6 (which we use due reasons).

@rbtcollins

This comment has been minimized.

Show comment
Hide comment
@rbtcollins

rbtcollins Jun 8, 2015

Contributor

@tomprince I'm interested in reasons if you can share. Also HTF does it create a non-matching version? Perhaps I misunderstand.

Working on a patch now.

Contributor

rbtcollins commented Jun 8, 2015

@tomprince I'm interested in reasons if you can share. Also HTF does it create a non-matching version? Perhaps I misunderstand.

Working on a patch now.

rbtcollins pushed a commit to rbtcollins/pip that referenced this issue Jun 9, 2015

@rbtcollins

This comment has been minimized.

Show comment
Hide comment
@rbtcollins

rbtcollins Jun 9, 2015

Contributor

Give #2886 a go.

Contributor

rbtcollins commented Jun 9, 2015

Give #2886 a go.

rbtcollins pushed a commit to rbtcollins/pip that referenced this issue Jun 9, 2015

dstufft added a commit that referenced this issue Jun 9, 2015

Merge pull request #2886 from rbtcollins/issue-2867
Issue #2867: Accept --no/only-binary via pip.conf
@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Jun 9, 2015

Member

Should be fixed now.

Member

dstufft commented Jun 9, 2015

Should be fixed now.

@dstufft dstufft closed this Jun 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment