Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 86c68b0

Browse files
committed
Adding PyPi upload to Makefile.
Signed-off-by: Tim 'mithro' Ansell <[email protected]>
1 parent 0845d55 commit 86c68b0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ENVIRONMENT_FILE := environment.yml
2020
include third_party/make-env/conda.mk
2121

2222
# Build the package locally
23+
# -------------------------------------
2324

2425
build: $(CONDA_ENV_PYTHON)
2526
$(IN_CONDA_ENV) python setup.py sdist bdist_wheel && twine check dist/*
@@ -33,3 +34,22 @@ build-clean:
3334
.PHONY: build build-clean
3435

3536
clean:: build-clean
37+
38+
# Upload the package to PyPi
39+
# -------------------------------------
40+
41+
#PYPI_TEST = --repository-url https://test.pypi.org/legacy/
42+
#PYPI_TEST = --repository testpypi
43+
44+
upload-test: build | $(CONDA_ENV_PYTHON)
45+
$(IN_CONDA_ENV) twine upload ${PYPI_TEST} dist/*
46+
47+
48+
.PHONY: upload-test
49+
50+
51+
upload: build | $(CONDA_ENV_PYTHON)
52+
$(IN_CONDA_ENV) twine upload --verbose dist/*
53+
54+
55+
.PHONY: upload

0 commit comments

Comments
 (0)