Opened 9 years ago

Closed 9 years ago

#5033 closed defect (fixed)

make ignores VIRTUALENV setting

Reported by: ayleph Owned by:
Priority: major Milestone: 0.8.0
Component: infrastructure Keywords: make, makefile, virtualenv
Cc: Parent Tickets:

Description

On my system (Arch Linux), virtualenv2 is the proper executable for creating a python2 virtualenv. This is correctly determined by ./configure as shown in the following output.

~/mediagoblin-0.8.0 $ ./configure 
checking for python2.7... python2.7
checking for virtualenv... no
checking for virtualenv3... no
checking for virtualenv2... virtualenv2

And this is properly set in Makefile as follows.

VIRTUALENV = virtualenv2

However, make ignores that setting and attempts to use virtualenv as shown below.

~/mediagoblin-0.8.0 $ make
rm -f ./bin/python
virtualenv --system-site-packages --python=python2.7 .
make: virtualenv: Command not found

This can be fixed by changing Makefile.in as follows.

diff --git a/Makefile.in b/Makefile.in
index 5530b9e..5964a82 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -121,7 +121,7 @@ i18n: $(maybe_venv_dep)
 ifneq ($(VIRTUALENV),no)
 ./bin/python:
        rm -f ./bin/python
-       virtualenv --system-site-packages --python=$(PYTHON) .
+       ${VIRTUALENV} --system-site-packages --python=$(PYTHON) .
        ./bin/python setup.py develop --upgrade
 
 virtualenv: bin/python extlib

Attachments (1)

0001-Use-virtualenv-set-by-configure.patch (686 bytes ) - added by ayleph 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Boris Bobrov, 9 years ago

Status: newreview

comment:2 by ayleph, 9 years ago

Owner: set to ayleph
Status: reviewin_progress

Assigning to myself. Will submit a git format patch for review.

comment:3 by ayleph, 9 years ago

Owner: ayleph removed
Status: in_progressreview

Patch attached in git format-patch format.

comment:4 by Christopher Allan Webber, 9 years ago

Resolution: fixed
Status: reviewclosed

Looks good. Applied and pushed, thanks ayleph!

Note: See TracTickets for help on using tickets.