Skip to content

Commit b43ae8a

Browse files
committed
Add packaging Makefile targets
1 parent 0ae4cc7 commit b43ae8a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ coverage:
2121
pytest --cov=src/ --cov-report=term-missing --cov-report=html --disable-warnings
2222
open htmlcov/index.html || xdg-open htmlcov/index.html
2323

24+
## Packages for both Python 2 and 3 for PyPi.
25+
.PHONY: packaging
26+
packaging:
27+
pipenv --rm
28+
rm Pipfile.lock
29+
pipenv --three install --dev
30+
pipenv run python setup.py sdist bdist_wheel
31+
pipenv --rm
32+
rm Pipfile.lock
33+
pipenv --two install --dev
34+
pipenv run python setup.py sdist bdist_wheel
35+
pipenv --rm
36+
rm Pipfile.lock
37+
38+
## Uploads packages to PyPi.
39+
.PHONY: upload
40+
upload:
41+
pipenv run twine upload dist/*
42+
43+
## Alias for packaging and upload together.
44+
.PHONY: pypi
45+
pypi: packaging upload setup
46+
2447
.DEFAULT:
2548
@$(MAKE) help
2649

0 commit comments

Comments
 (0)