diff --git a/.travis.yml b/.travis.yml index 92dea596..ed0e426e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,11 +17,3 @@ matrix: fast_finish: true before_install: pip install codecov after_success: codecov -deploy: - provider: pypi - user: mkdocsdeploy - on: - tags: true - distributions: sdist bdist_wheel - password: - secure: NajIoVN5cPFKq5EB1viIujcnwywFbOlU/KM5/Qp+WxdX5/ZTnFmaD1iwXc/6kgM07y3XVi6R/nDJr0eAC7kaCRnHE+uT7pRwJtXqtt2mkpIlHD8Y6ppPhxm9AnUhE638t22DuX89cD1JkkvQ97EGD6OJymWAVCRwwkzVzP1Cn/M= diff --git a/setup.py b/setup.py index c2020ca0..f5c53160 100755 --- a/setup.py +++ b/setup.py @@ -46,6 +46,22 @@ def get_package_data(package): for filename in filenames]) return {package: filepaths} + +if sys.argv[-1] == 'publish': + if os.system("pip freeze | grep wheel"): + print("wheel not installed.\nUse `pip install wheel`.\nExiting.") + sys.exit() + if os.system("pip freeze | grep twine"): + print("twine not installed.\nUse `pip install twine`.\nExiting.") + sys.exit() + os.system("python setup.py sdist bdist_wheel") + os.system("twine upload dist/*") + print("You probably want to also tag the version now:") + print(" git tag -a {0} -m 'version {0}'".format(get_version("mkdocs"))) + print(" git push --tags") + sys.exit() + + setup( name="mkdocs", version=get_version("mkdocs"),