|
| 1 | +PYTHON = python3.6 |
1 | 2 |
|
2 | 3 | test: install |
3 | | - python3 -m unittest |
| 4 | + $(PYTHON) -m unittest |
4 | 5 |
|
5 | 6 | install: build |
6 | | - python3 setup.py install --user |
| 7 | + $(PYTHON) setup.py install --user |
7 | 8 |
|
8 | 9 | build: Makefile module.c third-party/quickjs.c third-party/quickjs.h |
9 | | - python3 setup.py build |
| 10 | + $(PYTHON) setup.py build |
10 | 11 |
|
11 | 12 | format: |
12 | | - python3 -m yapf -i -r --style .style.yapf . |
| 13 | + $(PYTHON) -m yapf -i -r --style .style.yapf . |
13 | 14 | clang-format-7 -i module.c |
14 | 15 |
|
| 16 | +distribute: test |
| 17 | + rm -rf dist/ |
| 18 | + $(PYTHON) setup.py sdist |
| 19 | + |
| 20 | +upload-test: distribute |
| 21 | + $(PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* |
| 22 | + |
| 23 | +upload: distribute |
| 24 | + $(PYTHON) -m twine upload dist/* quickjs.egg-info/ |
| 25 | + |
15 | 26 | clean: |
16 | | - rm -rf build/ |
| 27 | + rm -rf build/ dist/ |
0 commit comments