diff --git a/.gitignore b/.gitignore index 57c431b..8f0ce23 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ sass/scss *.egg-info/ build/ .cache/ -.env/ +.env* diff --git a/Makefile b/Makefile index 673de17..f435008 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ include Makefile.config all: install lint check-outdated run-debug install: - test -d $(VENV) || virtualenv $(VENV) - $(PIP) install --upgrade --no-cache pip setuptools -e .[lint] devcore - $(NPM) install + test -d $(VENV) || virtualenv $(VENV) -p $(PYTHON_VERSION) + # $(PIP) install --upgrade --no-cache pip setuptools -e .[lint] devcore + # $(NPM) install clean: rm -fr $(NODE_MODULES) diff --git a/Makefile.config b/Makefile.config index 474b906..4452eac 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,7 +1,8 @@ PROJECT_NAME = butterfly # Python env -VENV = $(PWD)/.env +PYTHON_VERSION ?= python +VENV = $(PWD)/.env$(if $(filter $(PYTHON_VERSION),python),,-$(PYTHON_VERSION)) PIP = $(VENV)/bin/pip PYTHON = $(VENV)/bin/python PYTEST = $(VENV)/bin/py.test diff --git a/butterfly/utils.py b/butterfly/utils.py index 3bf8645..0eb0070 100644 --- a/butterfly/utils.py +++ b/butterfly/utils.py @@ -168,7 +168,7 @@ def get_lsof_socket_line(addr, port): # May want to make this into a dictionary in the future... regex = "\w+\s+(?P\d+)\s+(?P\w+).*\s" \ "(?P.*?):(?P\d+)->(?P.*?):(?P\d+)" - output = subprocess.check_output(['lsof', '-Pni']) + output = subprocess.check_output(['lsof', '-Pni']).decode('utf-8') lines = output.split('\n') for line in lines: # Look for local address with peer port