forked from PathOfBuildingCommunity/PathOfBuilding-Python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (32 loc) · 1.3 KB
/
setup.py
File metadata and controls
38 lines (32 loc) · 1.3 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
from setuptools import setup
import os
# https://docs.python.org/3/distutils/setupscript.html
# https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#scripts
def package_files(directory, extensions=''):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if extensions:
if filename.endswith(extensions):
paths.append(os.path.join('..', path, filename))
else:
paths.append(os.path.join('..', path, filename))
return paths
# let's get some data files
data_files = package_files('src/tree_data')
data_files.extend(package_files('src/data', '.xml'))
data_files.extend(package_files('src/data', '.json'))
setup(
name='PathOfBuilding-Python',
version='0.38',
package_dir={'PathOfBuilding': 'src'},
packages=['PathOfBuilding', 'PathOfBuilding.dialogs', 'PathOfBuilding.ui', 'PathOfBuilding.views',
'PathOfBuilding.widgets', 'PathOfBuilding.windows'],
package_data={'PathOfBuilding': data_files},
url='https://github.com/pHiney/PathOfBuilding-Python',
license='',
author='phiney',
author_email='',
description='Path Of Building written in Python',
scripts=['PathOfBuilding.sh', 'PathOfBuilding.bat']
)