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

Need a better way to deal with wheels when using pip #53

Closed
antevens opened this issue Jan 14, 2014 · 3 comments
Closed

Need a better way to deal with wheels when using pip #53

antevens opened this issue Jan 14, 2014 · 3 comments

Comments

@antevens
Copy link
Contributor

We have some problems when dealing with wheels and pip.

Pip does not support wheels prior to version 1.4.0
Pip wheels require setuptools/distribute > 0.8
Python 2.6 and older does not support setuptools/distribute > 0.8
Pip >= 1.5.0 tries to use wheels by default, even if wheel package is not
installed, in this case the --no-use-wheel flag needs to be passed
Versions prior to 1.4 don't support the --no-use-wheel flag

So depending on the version of pip is installed and if wheel support is available we now have to:

< 1.4.0 no flag

= 1.4.0 and < 1.5 ideally pass the use wheel flag if wheel support is installed but no flag is acceptable
= 1.5.0 pass the --no-use-wheel flag if wheel support isn't available, otherwise pass no flag

I started working on this on January 2nd when 1.5 was released but I'm still running into issues for some pip versions/cases.

Right now I'm using the following command but there are some cases where it does not work as it should, we need a better way of dealing with this.

"${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${pip_env} --log ${cwd}/pip.log install ${install_args} $wheel_support_flag ${proxy_flag} ${source}

@Ooblioob
Copy link

This is a great start, but a slight correction is needed. If an install_arg is passed that requires a second argument, such as -e, then when --no-use-wheel is added pip will pick this up as the argument.

For example, this is what gets generated: pip install -e --no-use-wheel /path/to/my/repo

It gives the following exception:

--no-use-wheel should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
Storing debug log for failure in /home/vagrant/.pip/pip.log

This could be solved by switching the order of ${install_args} and $wheel_support_flag so that wheel_support_flag is first

@teajaymars
Copy link

+1 to @Ooblioob, I have just run into this problem and came here to report the issue. I'm having to hack my manifests to work around the problem.

@tremblaysimon
Copy link
Contributor

I don't know if it is related, but I have that issue currently on a fresh system install, without using virtualenv, when I use pip:

Notice: /Stage[main]/Jenkins_ovh::Install/Python::Pip[fabric]/Exec[pip_install_fabric]/returns: no such option: --no-use-wheel Error: pip wheel --help > /dev/null 2>&1 && { pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; pip --log //pip.log install $wheel_support_flag fabric returned 2 instead of one of [0] Error: /Stage[main]/Jenkins_ovh::Install/Python::Pip[fabric]/Exec[pip_install_fabric]/returns: change from notrun to 0 failed: pip wheel --help > /dev/null 2>&1 && { pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; pip --log //pip.log install $wheel_support_flag fabric returned 2 instead of one of [0]

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

5 participants