-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·105 lines (94 loc) · 3.32 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
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/python3
#
# Helios, intelligent music.
# Copyright (C) 2015-2024 Cartesian Theatre. All rights reserved.
#
# Import modules...
from __future__ import with_statement
from setuptools import setup, find_packages
import importlib.util
import os
import sys
# To allow this script to be run from any path, change the current directory to
# the one hosting this script so that setuptools can find the required files...
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
# Get the long description from the ReadMe.md...
def get_long_description():
long_description = []
with open('README.md') as file:
long_description.append(file.read())
return '\n\n'.join(long_description)
# Read the module version directly out of the source...
def get_version():
# Path to file containing version string...
version_file = None
# Load the version module...
spec = importlib.util.spec_from_file_location('__version__', 'Source/helios/__version__.py')
spec.cached = None # Doesn't work
version_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(version_module)
# Return the version string...
return version_module.version
# Provide setup parameters for package...
setup(
# Metadata...
author='Cartesian Theatre',
author_email='[email protected]',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: ML',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Multimedia :: Sound/Audio :: Analysis',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Software Development :: Libraries :: Python Modules',
],
description='Pure python 3 module to communicate with a Helios server.',
keywords=[
'music',
'similarity',
'match',
'catalogue',
'digital',
'signal',
'processing',
'machine',
'learning'],
license='LGPL',
long_description=get_long_description(),
long_description_content_type='text/markdown',
name='helios-client',
project_urls={
'Bug Tracker': 'https://github.com/cartesiantheatre/python-helios-client/issues',
'Documentation': 'https://heliosmusic.io/api.html',
'Source Code': 'https://github.com/cartesiantheatre/python-helios-client'
},
url='https://www.heliosmusic.io',
version=get_version(),
# Options...
include_package_data=True,
install_requires=[
'attrs >= 18.2.0',
'brotli',
'marshmallow >= 3.16.0',
'requests',
'requests-toolbelt',
'simplejson',
'tqdm',
'urllib3'
],
package_dir={'': 'Source'},
packages=find_packages(where='Source'),
python_requires='>= 3.7',
zip_safe=True
)