Skip to content

Commit

Permalink
add support of pip --user option
Browse files Browse the repository at this point in the history
  • Loading branch information
bneron committed Nov 8, 2016
1 parent 25a8881 commit 7d1bf91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,17 @@ def __init__(self, attrs=None):

def get_install_data_dir(inst):
"""
:param inst: iinstallation option
:param inst: installation option
:type inst: dict
:return: the prefix where to install data
:rtype: string
"""

if 'VIRTUAL_ENV' in os.environ:
inst['prefix'] = ('environment', os.environ['VIRTUAL_ENV'])
elif 'user' in inst:
import site
inst['prefix'] = ('command line', site.USER_BASE)

if 'install_data' in inst:
install_dir = inst['install_data'][1]
Expand Down

0 comments on commit 7d1bf91

Please sign in to comment.