adds build script for deploying to pypi.org and smaller changes to the setup script
This commit is contained in:
29
build.py
Normal file
29
build.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import argparse
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser("Build script for pypi and pypi test")
|
||||||
|
group = parser.add_mutually_exclusive_group(required=True)
|
||||||
|
group.add_argument(
|
||||||
|
'--test',
|
||||||
|
action='store_true',
|
||||||
|
help='Build to test.pypi.org'
|
||||||
|
)
|
||||||
|
group.add_argument(
|
||||||
|
'--re',
|
||||||
|
action='store_true',
|
||||||
|
help='Build to pypi.org'
|
||||||
|
)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
subprocess.call(['python3', 'setup.py', 'sdist', 'bdist_wheel'])
|
||||||
|
if args.test:
|
||||||
|
subprocess.call(['twine', 'upload', '--config-file', '.pypirc', '--repository', 'testpypi', 'dist/*'])
|
||||||
|
elif args.re:
|
||||||
|
subprocess.call(['twine', 'upload', '--config-file', '.pypirc', '--repository', 'pypi', 'dist/*'])
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
2
setup.py
2
setup.py
@@ -4,7 +4,7 @@ with open('README.rst', 'r') as fh:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pi3-smart-workspace',
|
name='pi3-smart-workspace',
|
||||||
version='0.1.0',
|
version='0.1.1',
|
||||||
packages=['pi3'],
|
packages=['pi3'],
|
||||||
url='https://github.com/GeneralDenmark/PyOutputHandler',
|
url='https://github.com/GeneralDenmark/PyOutputHandler',
|
||||||
license='Apache-2.0 License ',
|
license='Apache-2.0 License ',
|
||||||
|
|||||||
Reference in New Issue
Block a user