From 1b363c817f1dfb4f6e9559918823cb7c3ee820fb Mon Sep 17 00:00:00 2001 From: Fabrice Salvaire Date: Sat, 22 Dec 2018 20:57:27 +0100 Subject: [PATCH] added tools --- tools/license-model-gpl.py | 19 +++++++++++++++++++ tools/make-api-doc | 17 +++++++++++++++++ tools/make-readme | 15 +++++++++++++++ tools/upload-to-pypi | 11 +++++++++++ 4 files changed, 62 insertions(+) create mode 100644 tools/license-model-gpl.py create mode 100755 tools/make-api-doc create mode 100755 tools/make-readme create mode 100755 tools/upload-to-pypi diff --git a/tools/license-model-gpl.py b/tools/license-model-gpl.py new file mode 100644 index 0000000..5ccca81 --- /dev/null +++ b/tools/license-model-gpl.py @@ -0,0 +1,19 @@ +#################################################################################################### +# +# PythonicGCodeMachine - @licence_header_description@ +# Copyright (C) 2018 Fabrice Salvaire +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +#################################################################################################### diff --git a/tools/make-api-doc b/tools/make-api-doc new file mode 100755 index 0000000..e4b8a38 --- /dev/null +++ b/tools/make-api-doc @@ -0,0 +1,17 @@ +#! /usr/bin/bash + +find PythonicGCodeMachine -name "flycheck*.py" -exec rm {} \; +find PythonicGCodeMachine -name "parsetab.py" -exec rm {} \; + +api=doc/sphinx/source/api +rm -rf ${api} + +echo +echo Generate RST API files +pyterate-rst-api PythonicGCodeMachine + +echo +echo Run Sphinx +pushd doc/sphinx/ +./make-html #--clean +popd diff --git a/tools/make-readme b/tools/make-readme new file mode 100755 index 0000000..91820ae --- /dev/null +++ b/tools/make-readme @@ -0,0 +1,15 @@ +#! /usr/bin/env python3 +# -*- Python -*- + +#################################################################################################### + +import subprocess + +from setup_data import long_description + +#################################################################################################### + +with open('README.rst', 'w') as f: + f.write(long_description) + +subprocess.call(('rst2html', 'README.rst', 'README.html')) diff --git a/tools/upload-to-pypi b/tools/upload-to-pypi new file mode 100755 index 0000000..36398ab --- /dev/null +++ b/tools/upload-to-pypi @@ -0,0 +1,11 @@ +#! /bin/bash + +# bdist +# python setup.py check --verbose --metadata --restructuredtext --strict && \ +# python setup.py register sdist upload + +python setup.py bdist_wheel + +twine register dist/*whl +gpg --detach-sign -a dist/*whl +twine upload dist/* -- GitLab