Skip to content

Commit e3f70fd

Browse files
committed
Beefier makefile
1 parent 81a7e56 commit e3f70fd

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Makefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build publish test test-all test-%
1+
.PHONY: build publish test test-all test-% clean
22

33
build:
44
python setup.py sdist bdist_wheel
@@ -13,7 +13,19 @@ test-all:
1313
${MAKE} test-3.7
1414
${MAKE} test-3.6
1515
${MAKE} test-3.5
16-
${MAKE} test-3.4
16+
17+
18+
ifeq ($(FAST),true)
19+
DOCKER_VOLUMES = -v $(shell pwd):/app
20+
else
21+
DOCKER_VOLUMES = -v $(shell pwd):/app
22+
DOCKER_VOLUMES += -v /app/.eggs
23+
DOCKER_VOLUMES += -v /app/.pytest_cache
24+
DOCKER_VOLUMES += -v /app/.slacktools.egg-info
25+
endif
1726

1827
test-%:
19-
docker run --rm -v $(shell pwd):/app -w /app python:$(@:test-%=%) python setup.py test
28+
docker run --rm ${DOCKER_VOLUMES} -w /app python:$(@:test-%=%) python setup.py test
29+
30+
clean:
31+
git clean -fdx -e *.iml -e .idea

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,6 @@ def find_version(*file_paths):
4949
packages=find_packages(exclude=['docs', 'tests']),
5050
setup_requires=["pytest-runner"],
5151
tests_require=["pytest", "pytest-cov"],
52-
install_requires=["typing"])
52+
install_requires=[
53+
"typing ; python_version<'3.5'"
54+
])

0 commit comments

Comments
 (0)