Skip to content

Commit dcb5d6f

Browse files
authored
Merge pull request #275 from fooof-tools/makefile
[MNT] - Update makefile options for distributions
2 parents 94fa407 + 8046fdf commit dcb5d6f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# coverage For running test coverage
1111
# pylint For running linting on code
1212
# setuptools For creating distributions
13+
# twine For checking and publishing distributions
1314
#
1415
# The following command line utilities are required:
1516
# cloc For counting lines of code
@@ -100,8 +101,22 @@ dist:
100101
@python setup.py sdist bdist_wheel
101102
@printf "\n\nDISTRIBUTION BUILD CREATED\n\n\n"
102103

104+
# Check a distribution build using twine
105+
check-dist:
106+
@printf "\n\nCHECKING DISTRIBUTION BUILD:\n"
107+
twine check dist/*
108+
@printf "\n"
109+
103110
# Clear out distribution files
104111
clear-dist:
105112
@printf "\n\nCLEARING DISTRIBUTION FILES...\n"
106113
@rm -rf build dist $(MODULE).egg-info
107114
@printf "DISTRIBUTION FILES CLEARED\n\n\n"
115+
116+
# Show commands for publishing the distribution
117+
# Note: this doesn't run the commands (to avoid accidental publishing)
118+
# This also assumes that you are using twine + .pypirc
119+
publish:
120+
@printf "\n\nTO PUBLISH THE DISTRIBUTION:\n\n"
121+
@printf "to testpypi: \n\ttwine upload --repository testpypi dist/*\n"
122+
@printf "to pypi: \n\ttwine upload --repository pypi dist/*\n\n"

0 commit comments

Comments
 (0)