diff --git a/.gitignore b/.gitignore index b0817f8..6de22df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -/dist-env/ +/env-publish/ __pycache__/ *.py[cod] diff --git a/Makefile b/Makefile index 3dea4e5..52fe468 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,16 @@ -.PHONY: help -help: - @echo 'commands:' - @echo ' dist' - -dist-env: - @echo Creating virtual environment... - @python3 -m venv 'dist-env' - @source dist-env/bin/activate && pip install twine - -.PHONY: dist -dist: dist-env - [ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment. - rm -rf dist +dist: setup.py lektor_inlinetags.py @echo Building... python3 setup.py sdist bdist_wheel - @echo rm -rf ./*.egg-info/ ./build/ MANIFEST + +env-publish: + @echo Creating virtual environment... + @python3 -m venv 'env-publish' + @source env-publish/bin/activate && pip install twine + +.PHONY: publish +publish: dist env-publish + [ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment. @echo Publishing... - @echo "\033[0;31mEnter your PyPI token:\033[0m" - @source dist-env/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/* + @echo "\033[0;31mEnter PyPI token in password prompt:\033[0m" + @source env-publish/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/* diff --git a/setup.py b/setup.py index 50aff6a..f71a225 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('README.md') as fp: setup( name='lektor-inlinetags', py_modules=['lektor_inlinetags'], - install_requires=['lektor-groupby>=0.9.5'], + install_requires=['lektor-groupby>=0.9.6'], entry_points={ 'lektor.plugins': [ 'inlinetags = lektor_inlinetags:InlineTagsPlugin',