Fix typing to work with pypi
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
04d877f7e7
commit
e6c005375d
2
MANIFEST.in
Normal file
2
MANIFEST.in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
global-include *.pyi
|
||||||
|
global-include *.typed
|
|
@ -4,8 +4,8 @@
|
||||||
Source: https://guacamole.apache.org/doc/0.9.0/guacamole-common-js/symbols/src/src_main_webapp_modules_Keyboard.js.html"""
|
Source: https://guacamole.apache.org/doc/0.9.0/guacamole-common-js/symbols/src/src_main_webapp_modules_Keyboard.js.html"""
|
||||||
|
|
||||||
|
|
||||||
__version__: str = "0.0.5"
|
__version__: str = "0.0.6"
|
||||||
__author__: str = "Ari Archer"
|
__author__: str = "AriArcher"
|
||||||
__author_email__: str = "ari.web.xyz@gmail.com"
|
__author_email__: str = "ari.web.xyz@gmail.com"
|
||||||
|
|
||||||
|
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -3,22 +3,22 @@ import setuptools # type: ignore
|
||||||
__author__: str = "AriArcher"
|
__author__: str = "AriArcher"
|
||||||
__author_email__: str = "ari.web.xyz@gmail.com"
|
__author_email__: str = "ari.web.xyz@gmail.com"
|
||||||
|
|
||||||
MODULE_NAME: str = "guacamole_keysyms"
|
MODULE_NAME: str = setuptools.find_packages()[0]
|
||||||
SAFE_MODULE_NAME: str = MODULE_NAME.replace("_", "-")
|
|
||||||
|
|
||||||
with open("README.md", "r") as desc:
|
with open("README.md", "r") as desc:
|
||||||
long_description: str = desc.read()
|
long_description: str = desc.read()
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name=SAFE_MODULE_NAME,
|
name=MODULE_NAME.replace("_", "-"),
|
||||||
version="0.0.5",
|
version="0.0.6",
|
||||||
author=__author__,
|
author=__author__,
|
||||||
author_email=__author_email__,
|
author_email=__author_email__,
|
||||||
description="Guacamole protocol key mappings for python",
|
description="Guacamole protocol key mappings for python",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
url=f"https://ari-web.xyz/gh/{SAFE_MODULE_NAME}",
|
url=f"https://ari-web.xyz/gh/{MODULE_NAME}",
|
||||||
packages=setuptools.find_packages(),
|
packages=[MODULE_NAME],
|
||||||
|
package_dir={MODULE_NAME: MODULE_NAME},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
||||||
|
@ -27,7 +27,7 @@ setuptools.setup(
|
||||||
python_requires=">=3.8",
|
python_requires=">=3.8",
|
||||||
package_data={
|
package_data={
|
||||||
MODULE_NAME: [
|
MODULE_NAME: [
|
||||||
f"{MODULE_NAME}/py.typed",
|
"py.typed",
|
||||||
f"{MODULE_NAME}/__init__.pyi",
|
f"{MODULE_NAME}/__init__.pyi",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
19
tests/type_checks.py
Normal file
19
tests/type_checks.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import sys
|
||||||
|
from warnings import filterwarnings as filter_warnings
|
||||||
|
|
||||||
|
import guacamole_keysyms
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
"""Entry/main function"""
|
||||||
|
|
||||||
|
print(guacamole_keysyms)
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
assert main.__annotations__.get("return") is int, "main() should return an integer"
|
||||||
|
|
||||||
|
filter_warnings("error", category=Warning)
|
||||||
|
sys.exit(main())
|
Loading…
Reference in a new issue