-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
86 lines (72 loc) · 2.49 KB
/
setup.py
File metadata and controls
86 lines (72 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from setuptools import find_packages
from setuptools import setup
import codecs
import os
import re
def get_long_description():
long_description = ""
with open("README.md", "r") as file:
long_description += file.read()
long_description += "\n\n"
with open("CHANGELOG.md", "r") as file:
long_description += file.read()
return long_description
here = os.path.abspath(os.path.dirname(__file__))
def find_version(*file_paths):
path = os.path.join(here, *file_paths)
with codecs.open(path, 'r') as fp:
version_file = fp.read()
version_match = re.search(r"__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def find_auther(*file_paths):
path = os.path.join(here, *file_paths)
with codecs.open(path, 'r') as fp:
auther_file = fp.read()
auther_match = re.search(r"__auther__ = ['\"]([^'\"]*)['\"]",
auther_file, re.M)
if auther_match:
return auther_match.group(1)
raise RuntimeError("Unable to find auther string.")
setup(
name="wappstoiot",
python_requires='>=3.7.0',
version=find_version("wappstoiot", "__init__.py"),
author=find_auther("wappstoiot", "__init__.py"),
author_email="support@seluxit.com",
license="Apache-2.0",
description="Simple Wappsto Python user-interface to Wappsto IoT",
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/Wappsto/python-wappsto-iot",
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
],
packages=find_packages(),
# tests_require=[
# 'pytest',
# 'tox'
# ],
package_data={
'wappstoiot': ["py.typed", "*.pyi", "**/*.pyi"]
},
install_requires=[
'slxjsonrpc>=0.9.2',
'pydantic>=2.0.0,<3.0.0',
],
# entry_points={ # TODO: fix __main__.py to be optional.
# "console_scripts": "wappstoiot=wappstoiot:__main__"
# },
# extras_require={ # TODO: fix __main__.py to be optional.
# "cli": [
# 'requests',
# ]
# },
)