Skip to content

Commit

Permalink
Merge pull request #101 from ryukinix/fix/setup
Browse files Browse the repository at this point in the history
Fix: setup.py Makefile and requirements-dev.txt
  • Loading branch information
ryukinix authored Sep 13, 2018
2 parents f61b315 + d1be1b8 commit ae178da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

try:
import pypandoc
long_description = pypandoc.convert(readme, 'rst', format='markdown')
long_description = pypandoc.convert_file(readme, 'rst', format='markdown')
except ImportError:
warn("Only-for-developers: you need pypandoc for upload "
"correct reStructuredText into PyPI home page")
Expand Down

0 comments on commit ae178da

Please sign in to comment.