From 15a3cb84ebfd6eb810f3790adbfdc073343eae60 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 11 Nov 2019 10:16:39 +0100 Subject: [PATCH] Initial commit --- .gitignore | 9 +++++++++ README.md | 5 +++++ requirements.txt | 0 setup.py | 24 ++++++++++++++++++++++++ to_pypi.bat | 3 +++ to_pypi.sh | 12 ++++++++++++ {packname}/__init__.py | 17 +++++++++++++++++ {packname}/commands/__init__.py | 10 ++++++++++ {packname}/stars/__init__.py | 16 ++++++++++++++++ {packname}/tables/__init__.py | 10 ++++++++++ 10 files changed, 106 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 to_pypi.bat create mode 100644 to_pypi.sh create mode 100644 {packname}/__init__.py create mode 100644 {packname}/commands/__init__.py create mode 100644 {packname}/stars/__init__.py create mode 100644 {packname}/tables/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..68d69529 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +config.ini +.idea/ +.vscode/ +__pycache__ +*.egg-info/ +.pytest_cache/ +dist/ +build/ +venv/ diff --git a/README.md b/README.md new file mode 100644 index 00000000..6fae0ea8 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# `{packname}` [![PyPI](https://img.shields.io/pypi/v/{packname}.svg)](https://pypi.org/project/{packname}/) + +{Replace everything surrounded by braces with your own data, including this description!} + +{Files to be changed are the package folder, setup.py, to_pypi.sh and this README!} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..e69de29b diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..e625dbff --- /dev/null +++ b/setup.py @@ -0,0 +1,24 @@ +import setuptools + +with open("README.md", "r") as f: + long_description = f.read() + +with open("requirements.txt", "r") as f: + install_requires = f.readlines() + +setuptools.setup( + name="{packname}", + version="0.1", + author="{packauthorname}", + author_email="{packauthoremail}", + description="{packdescription}", + long_description=long_description, + long_description_content_type="text/markdown", + url="{packgithublink}", + packages=setuptools.find_packages(), + install_requires=install_requires, + python_requires=">=3.7", + classifiers=[ + "Programming Language :: Python :: 3.7", + ], +) diff --git a/to_pypi.bat b/to_pypi.bat new file mode 100644 index 00000000..beb035bc --- /dev/null +++ b/to_pypi.bat @@ -0,0 +1,3 @@ +del /f /q /s dist\*.* +python setup.py sdist bdist_wheel +twine upload dist/* diff --git a/to_pypi.sh b/to_pypi.sh new file mode 100644 index 00000000..87a9819e --- /dev/null +++ b/to_pypi.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Royalnet must be installed with `develop` +VERSION=$(python3.7 -m royalpack.version) + +rm -rf dist +python setup.py sdist bdist_wheel +twine upload "dist/{packname}-$VERSION"* +git add * +git commit -m "$VERSION" +git push +hub release create --message "Version $VERSION" --prerelease "$VERSION" diff --git a/{packname}/__init__.py b/{packname}/__init__.py new file mode 100644 index 00000000..8d53497f --- /dev/null +++ b/{packname}/__init__.py @@ -0,0 +1,17 @@ +# This is a template Pack __init__. You can use this without changing anything in other packages too! + +from . import commands, tables, stars +from .commands import available_commands +from .tables import available_tables +from .stars import available_page_stars, available_exception_stars + +__all__ = [ + "commands", + "tables", + "stars", + "available_commands", + "available_tables", + "available_page_stars", + "available_exception_stars", +] + diff --git a/{packname}/commands/__init__.py b/{packname}/commands/__init__.py new file mode 100644 index 00000000..bf5c2b43 --- /dev/null +++ b/{packname}/commands/__init__.py @@ -0,0 +1,10 @@ +# Imports go here! + + +# Enter the commands of your Pack here! +available_commands = [ + +] + +# Don't change this, it should automatically generate __all__ +__all__ = [command.__name__ for command in available_commands] diff --git a/{packname}/stars/__init__.py b/{packname}/stars/__init__.py new file mode 100644 index 00000000..dcfea74b --- /dev/null +++ b/{packname}/stars/__init__.py @@ -0,0 +1,16 @@ +# Imports go here! + + +# Enter the PageStars of your Pack here! +available_page_stars = [ + +] + +# Enter the ExceptionStars of your Pack here! +available_exception_stars = [ + +] + +# Don't change this, it should automatically generate __all__ +__all__ = [command.__name__ for command in [*available_page_stars, *available_exception_stars]] + diff --git a/{packname}/tables/__init__.py b/{packname}/tables/__init__.py new file mode 100644 index 00000000..961c34f9 --- /dev/null +++ b/{packname}/tables/__init__.py @@ -0,0 +1,10 @@ +# Imports go here! + + +# Enter the tables of your Pack here! +available_tables = [ + +] + +# Don't change this, it should automatically generate __all__ +__all__ = [table.__name__ for table in available_tables]