-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.07 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# When running from command line don't set user so it will use your ~/.pypirc file
#ifneq ($(PYPI_USER),)
# PYPI_USER_ARG = -u ${PYPI_USER}
#endif
#ifneq ($(PYPI_PASSWORD),)
# PYPI_PASSWORD_ARG = -p ${PYPI_PASSWORD}
#endif
PYPI_ARGS=dist/* $(PYPI_USER_ARG) $(PYPI_PASSWORD_ARG)
.PHONY: install_dependancies build publish_pypi_test publish_pypi
all: install_dependancies build publish_pypi_test publish_pypi
install_dependancies:
python3 -m pip install --upgrade pip setuptools wheel twine
build:
rm dist/*
python3 setup.py sdist
python3 setup.py bdist_wheel
# This uses skip existing so it doesn't fail in regression
publish_pypi_test:
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing $(PYPI_ARGS)
publish_pypi:
twine upload $(PYPI_ARGS)
publish:
twine upload $(PYPI_ARGS)
# If you already have a ~/.polyglot then make sure Test=1 is in it!
test_setup:
if [ ! -d ~/.polyglot ]; then mkdir ~/.polyglot ; echo "Test=1\nUSE_HTTPS=false" > ~/.polyglot/.env ; fi
python setup.py install
test:
./scripts/tests.sh