Skip to content

Commit

Permalink
Fix Makefile and deploy logic + requirements-dev.txt
Browse files Browse the repository at this point in the history
+ Twine now is required to upload to pypi.
+ pandoc doesn't exists -> pypandoc
+ Rename requirements-docs.txt -> requirements-dev.txt
+ Add twine and wheel as dependency (for upload to pypi)
  • Loading branch information
ryukinix committed Sep 13, 2018
1 parent f61b315 commit 74e1630
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
35 changes: 9 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ PYTHON = python3
INSTALL = install
DEVELOP = develop
TARGET = setup.py
TEST_DEPLOY = sdist bdist_wheel upload --repository pypitest --sign
TEST_REGISTER = register --repository pypitest
DEPLOY = sdist bdist_wheel upload --repository pypi --sign
REGISTER = register --repository pypi
BUILD_GARBAGE = build/ dist/
Expand All @@ -16,12 +14,16 @@ BUILD = sdist bdist_wheel
all: install
@make clean

dev-dependencies:
pip install -r requirements-dev.txt

check:
@echo "+===============+"
@echo "| CHECK |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(CHECK)
@echo "ok!"

clean:
@echo "+===============+"
@echo "| CLEAN BUILD |"
Expand All @@ -42,19 +44,12 @@ build:
@echo "+===============+"
$(PYTHON) $(TARGET) $(BUILD)


develop:
@echo "+===============+"
@echo "| DEVELOP |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEVELOP)

test-register:
@make check
@echo "+===============+"
@echo "| TEST-REGISTER |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(TEST_REGISTER)

develop-uninstall:
@echo "+===============+"
Expand All @@ -64,27 +59,20 @@ develop-uninstall:
@make clean
rm -rfv $(EGG)

test-deploy:
@make check
@echo "+===============+"
@echo "| TEST-DEPLOY |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(TEST_DEPLOY)

deploy:
deploy: dev-dependencies check build
@make check
@echo "+===============+"
@echo "| DEPLOY |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEPLOY)
twine upload dist/*


register:
register: dev-dependencies
@make check
@echo "+===============+"
@echo "| REGISTER |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(REGISTER)
twine register

help:
@echo "+=============================================+"
Expand All @@ -102,18 +90,13 @@ help:
@echo
@echo "make build:"
@echo " build the package as egg-file"
@echo
@echo "make develop:"
@echo " install in develop mode (symlink)"
@echo
@echo "make develop-uninstall:"
@echo " uninstall develop files and clean build"
@echo
@echo "make test-register:"
@echo " test register using the testPyPI server "
@echo
@echo "test-deploy:"
@echo " test deploy using the testPyPI server"
@echo
@echo "deploy:"
@echo " deploy to PyPY"
@echo
Expand Down
4 changes: 3 additions & 1 deletion requirements-docs.txt → requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sphinx
sphinx_rtd_theme
pandoc
pypandoc
twine
wheel

0 comments on commit 74e1630

Please sign in to comment.