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

Ability to blacklist certain packages from auto wheel building #2675

Closed
dstufft opened this issue Apr 13, 2015 · 14 comments
Closed

Ability to blacklist certain packages from auto wheel building #2675

dstufft opened this issue Apr 13, 2015 · 14 comments
Labels
auto-locked Outdated issues that have been locked by automation
Milestone

Comments

@dstufft
Copy link
Member

dstufft commented Apr 13, 2015

As of pip 7.0 pip will automatically build Wheels of sdists prior to installation, however some projects simply don't work when installed via Wheel. Before we release 7.0 we'll need some method for end users to opt out of, on a per project basis, the auto wheel building.

@dstufft dstufft added the !release blocker Hold a release until this is resolved label Apr 13, 2015
@dstufft dstufft added this to the 7.0 milestone Apr 13, 2015
@rbtcollins
Copy link

I think we should have the blacklist apply to all wheels.

pip install --no-wheels-for=foo,bar,baz
-> don't accept wheels for them on indices
-> don't auto-build wheels for them

@dstufft
Copy link
Member Author

dstufft commented Apr 17, 2015

That makes sense to me, I wonder if there's a (reasonable) way to make it more generic so you can explicitly list what formats you accept and don't accept for a particular project. In my head I can't think of a good way of doing that except for something like --(no|only)-wheels-for which is tied specifically into wheels vs sdist but that might be OK since I think it's unlikely we're ever going to support a second kind of binary distribution format and I can't think of a third type of package besides source and binary.

@pfmoore did raise an issue before about being able to ask for only wheels in #2084 which has some other discussion which might make sense to design something that works for both situation. He also called the option --binary-only so maybe --(no|only)-binary would make sense for a pair of options that take a list of project names that either cannot use binary packages or must use binary packages.

A third thought is that it might make sense for these options to warn if they are going to cause the latest version to be ignored because it's not a binary (or it's only a binary).

@rbtcollins
Copy link

How about:
--binary-only -> only binaries for everything
--no-binary -> no binaries for anything
--binary-only=x,y,z -> only binaries for those things
--no-binary=x,y,z -> no binaries for those things
with last-option-given-wins, and parameters are additive.
That is:
--binary-only --no-binary : will use no binaries for anything, won't autobuild wheels.
--binary-only --no-binary=lxml : will use binaries for everything except lxml(and won't autobuild wheels for it either)
--binary-only --no-binary=lxml,pyyaml : will use binaries for everything except lxml and pyyaml (and won't autobuild wheels for them either)

@rbtcollins
Copy link

W.r.t. logging a warning - I don't think we warn today do we (if someone has published only a wheel and no-use-wheel is in effect?)

@dstufft
Copy link
Member Author

dstufft commented Apr 17, 2015

I like that, I'm not sure if our parsing can handle the case where something is sometimes a flag and sometimes not a flag (I guess you'd have to explicitly mandate that you use the = sign when it's not a flag but takes parameters?). I have a (not very) secret desire to eventually switch our commands over to using click instead of our hacked up home grown stuff. If our parser can handle --binary-only and --binary-only=foo being different we should double check that click's can as well. I am concerned that it would act differently than our other flags which support both --foo=bar and --foo bar.

I think that the option in general isn't going to be used a whole lot, and I think when it is that it's likely going to be used inside of a configuration file more often than it's used on the command line itself. What do you think about just using a special constant to define "all", like --binary-only :all: or --binary-only '*' or something?

WRT to a warning, I don't consider it a blocker to getting this issue done, I just thought it would be nice to issue a warning. I think we'd probably deprecate --[no-]-use-wheel in favor of this new option since it can handle every use case of that plus more, but you're correct we don't currently log a warning.

@rbtcollins
Copy link

We could use :all: if you like. I know argparse can do what I'm thinking of, and if click is build on argparse it should be able to (or should be extendable to be able to).

@dstufft
Copy link
Member Author

dstufft commented Apr 17, 2015

pip (and click) are based on optparse.

@rbtcollins
Copy link

Alright, well I know optparse could do it too (hell, I did a top down syntax for arguments in optparse once :)) but doing :all: is easy enough.

@pfmoore
Copy link
Member

pfmoore commented Apr 17, 2015

Our options can also be specified in config files or environment variables, so you'd need to make sure that a "sometimes a flag" option worked there as well. I doubt that's possible, so I'd go for an :all: option.

On a bikeshedding note, I've seen programs use ALL (case sensitive) like this before, although I can't recall where offhand, but using :all: is new to me. Maybe ALL would be better for consistency? (With those programs I can't remember - this isn't a particularly good argument, is it? :-))

@rbtcollins
Copy link

ALL is a valid pypi package name.

rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 20, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 21, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 21, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
@rbtcollins rbtcollins mentioned this issue Apr 21, 2015
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 21, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 23, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 23, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
rbtcollins added a commit to rbtcollins/pip that referenced this issue Apr 23, 2015
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes pypa#2084
@dstufft
Copy link
Member Author

dstufft commented Apr 24, 2015

This is handled now in #2675

@dstufft dstufft closed this as completed Apr 24, 2015
@znation
Copy link

znation commented Jun 4, 2015

@dstufft That link seems like a circular reference (#2675). Where can I find documentation on how to blacklist a package from auto wheel building?

@dstufft
Copy link
Member Author

dstufft commented Jun 4, 2015

--no-binary package1,package2,package3

@pradyunsg pradyunsg removed !release blocker Hold a release until this is resolved labels Feb 8, 2019
@lock
Copy link

lock bot commented May 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants