Skip to content

Commit

Permalink
Detect normal proxy variables instead of defining my own
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 1, 2019
1 parent 33c6d15 commit 146b841
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions c/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
PY?=python3
PROXY?=
USER_FLAG?=--user
PIP?=$(PY) -m pip

ifneq ($(PROXY), )
PROXY_ARG="--proxy=$(PROXY)"
ifneq ($(https_proxy), )
PROXY_ARG=--proxy=$(https_proxy)
else
ifneq ($(http_proxy), )
PROXY_ARG=--proxy=$(http_proxy)
else
PROXY_ARG=
endif
endif

test_%: dependencies
$(PY) -m pytest -v -n$* test_euler.py
Expand Down
9 changes: 6 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
LINT?=
PY?=python3
PROXY?=
USER_FLAG?=--user
PIP?=$(PY) -m pip
MYPY?=true
Expand All @@ -23,11 +22,15 @@ endif
endif
endif

ifneq ($(PROXY), )
PROXY_ARG="--proxy=$(PROXY)"
ifneq ($(https_proxy), )
PROXY_ARG=--proxy=$(https_proxy)
else
ifneq ($(http_proxy), )
PROXY_ARG=--proxy=$(http_proxy)
else
PROXY_ARG=
endif
endif

test: dependencies _test

Expand Down

0 comments on commit 146b841

Please sign in to comment.