-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
74 lines (63 loc) · 1.96 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
#! /usr/bin/env python
import ast
import importlib.util
import setuptools
PKG_DIR = 'auxjad'
def find_version():
r"""Return value of __version__.
Reference: https://stackoverflow.com/a/42269185/
"""
version_file_path = importlib.util.find_spec(PKG_DIR).origin
with open(version_file_path, 'r') as file_contents:
root_node = ast.parse(file_contents.read())
for node in ast.walk(root_node):
if isinstance(node, ast.Assign):
if (len(node.targets) == 1
and node.targets[0].id == '__version__'):
return node.value.s
raise RuntimeError('Unable to find version string.')
with open('README.rst', 'r') as file:
auxjad_long_description = file.read()
auxjad_classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Artistic Software',
'Topic :: Utilities',
]
install_requires = [
'abjad==3.4',
'flake8',
'isort',
'pydocstyle',
'pytest',
'setuptools',
]
keywords = [
'algorithmic composition',
'generative music',
'music composition',
'music notation',
'lilypond',
'abjad',
]
if __name__ == '__main__':
setuptools.setup(
author_email='[email protected]',
author='Gilberto Agostinho',
classifiers=auxjad_classifiers,
description='Auxiliary classes and functions for Abjad.',
install_requires=install_requires,
license='MIT',
long_description=auxjad_long_description,
name='auxjad',
packages=['auxjad'],
platforms='Any',
python_requires='>=3.9',
url='https://gilbertohasnofb.github.io/auxjad-docs/',
version=find_version(),
)