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

Travis: Fix requirements install #5061

Merged
merged 1 commit into from Sep 20, 2017

Conversation

Projects
None yet
4 participants
@geky
Member

geky commented Sep 8, 2017

pip requires --user flag when installing executables outside of sudo context

see #5055
cc @0xc0170, @theotherjimmy

@geky geky changed the title from Fix travis requirements install to Travis: Fix requirements install Sep 8, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 9, 2017

Is there any doc reference for this? Is also the fix referenced above needed or this supersedes it?

@geky

This comment has been minimized.

Member

geky commented Sep 11, 2017

So what I can find on the python side: https://www.python.org/dev/peps/pep-0370/

Basically, pip install tries to install in the python library path. This is usually in an admin-only location that requires sudo (default on ubuntu), but could be somewhere that every user has write access to if you like living life on the edge.

They added pip install --user for user-local installs which should never require sudo, but they couldn't change the default behavior for backwards compatibility.

Options are use sudo pip install or pip install --user. Unfortunately virtualenvs cause problems for sudo pip install, though I'm not aware of all the details. I ran into an issue earlier that travis wasn't putting sudo pip install in the python path, it's fixed now, but pip install --user seems more reliable.


Is also the fix referenced above needed or this supersedes it?

Good point, will remove

@geky geky force-pushed the geky/fix-travis branch from fa01cff to b2bbaf7 Sep 11, 2017

- pip install --user hypothesis
- pip install --user mock
- pip install --user coverage
- pip install --user coveralls

This comment has been minimized.

@Nodraak

Nodraak Sep 12, 2017

Contributor

Should not we have a requirements-travis.txt or requirements-test.txt file for theses? If not, why don't we install all packages in one pip install command?

This comment has been minimized.

@geky

geky Sep 12, 2017

Member

I don't think this list is big enough to need another level of indirection IMO.

I can run these all in one command though.

This comment has been minimized.

@geky

geky Sep 16, 2017

Member

Ok, for some reason combining all of the requirements into one pip install command caused travis to fail. I couldn't figure out why.

This comment has been minimized.

@Nodraak

Nodraak Sep 16, 2017

Contributor

If I am right, the error is from six import wraps - ImportError: cannot import name wraps.
Here I found that Mock requires six version 1.7 or newer.
I think you should add pip install --upgrade six to upgrade the already installed six to the newest version.

Anyway, I'm being picky, if it's good enough for mbed's maintainers, let's merge as it is :)

This comment has been minimized.

@geky

geky Sep 18, 2017

Member

Huh, then why would pip work in this configuration?

This comment has been minimized.

@Nodraak

Nodraak Sep 18, 2017

Contributor

hum yeah, you are right ... no idea ¯(°_o)/¯

@geky geky force-pushed the geky/fix-travis branch 2 times, most recently from de8c730 to c10adfa Sep 12, 2017

Fix travis requirements install
pip requires --user flag when installing executables outside of sudo context

@geky geky force-pushed the geky/fix-travis branch from c10adfa to 94c972e Sep 15, 2017

@geky

This comment has been minimized.

Member

geky commented Sep 18, 2017

@0xc0170, this is probably ready, won't need morph test either

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Sep 20, 2017

2X travis builds. This must be extra safe!

@theotherjimmy theotherjimmy merged commit b494d33 into master Sep 20, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@geky geky deleted the geky/fix-travis branch Sep 26, 2017

geky added a commit to ARMmbed/sd-driver that referenced this pull request Sep 27, 2017

Fix .travis.yml requirements install
Needs --user flag for reasons, see ARMmbed/mbed-os#5061

superseeds #60
cc @deepikabhavnani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment