-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
93 lines (79 loc) · 3.2 KB
/
setup.py
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
87
88
89
90
91
92
93
import os
from setuptools import setup, find_packages
# our package constants.
from bosesoundtouchapi.bstconst import (
VERSION
)
# setup constants.
NAME = 'bosesoundtouchapi'
DESCRIPTION = 'BOSE SoundTouch API Python3 Library'
#VERSION = '0.0.1' # pulled from package constants above.
# if installing using less than Python v3, then stop the install!
import sys
if sys.version_info < (3,4):
sys.exit('Sorry, Python < 3.4 is not supported.')
# function to read the contents of the README.md file, and return it to the caller.
def readme(pathName:str):
with open(pathName) as f:
return f.read()
# function to build a list of files in a directory.
def getDirFilesList(pathName:str) -> list[str]:
print(str.format("getting list of files in path \"{0}\" ...", pathName))
dir_list = os.listdir(pathName)
files:list[str] = []
for file in dir_list: # process all matches.
if os.path.isfile(pathName + file): # only include files (not directories)
files.append(str(pathName + file))
return files
# package setup.
setup(
# basic package information.
name=NAME,
version=VERSION,
author='Todd Lucas',
author_email='<[email protected]>',
description=DESCRIPTION,
# use the README.md markdown file for the description.
long_description_content_type='text/markdown',
long_description=readme('README.md'),
# find and include all packages in the project (anything with an '__init__.py' file).
packages=find_packages(),
# place documentation folder named "docs" in the package folder.
data_files=[
('../../bosesoundtouchapi/docs', getDirFilesList('docspdoc/build/')),
('../../bosesoundtouchapi/docs/bosesoundtouchapi', getDirFilesList('docspdoc/build/bosesoundtouchapi/')),
],
# set minimum python version requirement.
python_requires='>3.4.1',
# set minimum dependencies requirements.
install_requires=[
'smartinspectPython==3.0.33',
'tinytag==1.10.0',
'urllib3>=1.21.1,<1.27',
'websocket-client==1.6.4',
'zeroconf'
],
# set keywords to associate this package with on Pypi.org.
keywords=['bose', 'soundtouch', 'api', 'audio', 'speaker'],
# set classifiers to associate this package with on Pypi.org.
classifiers=[
'Development Status :: 5 - Production/Stable',
# 'Development Status :: 2 - Pre-Alpha',
# 'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Unix',
'Topic :: Software Development :: Libraries',
'Topic :: Multimedia :: Sound/Audio',
'Natural Language :: English',
'License :: Free To Use But Restricted',
],
# provide some links to list on the Pypi.org site.
project_urls={
'Changelog': 'https://github.com/thlucas1/bosesoundtouchapi/blob/master/CHANGELOG.md',
'Documentation': 'https://bosesoundtouchapi.readthedocs.io/en/latest/__init__.html',
'GitHub': 'https://github.com/thlucas1/bosesoundtouchapi',
}
)