Makefile: don't use system packages when creating virtualenv
AbandonedPublic

Authored by kparal on Feb 3 2017, 8:36 AM.

Details

Reviewers
None
Group Reviewers
resultsdb
Summary

This should eliminate differences between setups on different machines.
This project doesn't need system packages, everything can be installed
from PyPI. That's also the same approach that is recommended in README.
The current state was probably just a copy-paste from a different
project.

Also remove --force-reinstall from pip command line, it has no
effect when --upgrade is not present.

If you approve this, I'll make the same change also to #resultsdb_api and #resultsdb_frontend.

Test Plan

Remove the existing test_env/ and run make test, should work without problems (patch from D1111 has to be applied first).

Diff Detail

Repository
rRSDB resultsdb
Branch
feature/venv (branched from develop)
Lint
No Linters Available
Unit
Unit Tests OK
Build Status
Buildable 1013
Build 1013: arc lint + arc unit
kparal retitled this revision from to Makefile: don't use system packages when creating virtualenv.Feb 3 2017, 8:36 AM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added a reviewer: resultsdb.
kparal updated this revision to Diff 2836.Feb 3 2017, 7:20 PM

rebase

(Reposting the relevant bits of conversation from D1111)

JSKLADAN:
@kparal maybe even too pristine?

No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
 #include <ffi.h>
                 ^
compilation terminated.

KPARAL:
We'll need to mention this in the README. I'll update the diff. Please install libffi-devel and try again, thanks.

JSKLADAN:
Sure can do, but tell me once again, where will the make test actually be used? If it is supposed to be the 'primary' recommended way to run the testsuite for devs, then I'd object, honestly, as I don't see how compiling a bunch of libs is reasonable.

OK, so more into the compilation fun, seems like openssl is missing now:

build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
 #include <openssl/opensslv.h>
                              ^
compilation terminated.
error: command 'gcc' failed with exit status 1

The same with openssl-devel. For general discussion of --system-site-packages, I replied to qa-devel:
https://lists.fedoraproject.org/archives/list/qa-devel@lists.fedoraproject.org/thread/YHNGP26PPB5OUYQPDIDEVNIQY5MAN54J/
(but hyperkitty seems to be somehow slow to showing latest emails)

@kparal honestly, at this point, would it not be better, if you just spun-up an 'empty' virtual machine, and figured out all the deps? Not that I have huge issues with polluting my system with random -dev packages (and I sure could figure all of the out on my own, given enough time), but I don't see the benefit, honestly. Let's discuss in qa-devel.

kparal added a comment.Feb 6 2017, 2:58 PM

An alternative approach has been posted in D1114.

kparal abandoned this revision.Feb 7 2017, 8:21 AM

Superseded by D1114.