forked from patacrep/patacrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·79 lines (68 loc) · 2.3 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
#!/usr/bin/env python3
"""Installation script for songbook.
$ python setup.py install
"""
from patacrep import __version__
from setuptools import setup, find_packages
import os
import sys
setup_kwargs = {
'setup_requires': [],
}
if sys.platform[0:3] == 'win':
from patacrep import __DATADIR__
def recursive_find(root_directory):
"""Recursively find files from a root_directory.
Return a list of files matching those conditions.
Arguments:
- `root_directory`: root directory of the search.
"""
if not os.path.isdir(root_directory):
return
olddir = os.getcwd()
os.chdir(root_directory)
for root, _, filenames in os.walk(os.curdir):
for filename in filenames:
yield os.path.join(root, filename)
os.chdir(olddir)
# List the data files
data_files = recursive_find(__DATADIR__)
data_files = ["data/" + d for d in data_files]
setup_kwargs['package_data'] = {'patacrep': data_files}
else:
setup_kwargs['setup_requires'].append('hgtools')
setup_kwargs['include_package_data'] = True
setup(
name='patacrep',
version=__version__,
description='Songbook compilation chain',
author='The Songbook team',
author_email='[email protected]',
url='https://github.com/patacrep/patacrep',
packages=find_packages(exclude=["test*"]),
license="GPLv2 or any later version",
install_requires=[
"argdispatch", "unidecode", "jinja2", "ply", "pyyaml",
],
entry_points={
'console_scripts': [
"songbook = patacrep.songbook.__main__:main",
"patatools = patacrep.tools.__main__:main",
],
},
classifiers=[
"Environment :: Console",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Utilities",
],
platforms=["GNU/Linux", "Windows", "MacOsX"],
test_suite="test.suite",
long_description = open("README.rst", "r").read(),
**setup_kwargs
)