-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
34 lines (27 loc) · 810 Bytes
/
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
import configparser as ConfigParser
import os
from setuptools import setup
import sysconfig
import sys
etc_dirname = 'etc'
gui_dirname = 'bill.gui'
cfg = ConfigParser.ConfigParser()
cfg.read('setup.cfg')
my_package_name = cfg.get('metadata', 'name')
if sys.platform == 'win32':
site_packages_path = 'scripts'
else:
site_packages_path = 'bin'
data_files_path = site_packages_path
def tree(src):
result = []
data_file_path = os.path.join(data_files_path, src)
for root, dirs, files in os.walk(src):
for file in files:
if os.path.sep in root:
sub_root = root.split(os.path.sep, 1)[-1]
file = os.path.join(sub_root, file)
result.append(os.path.join(src, file))
return [(data_file_path, result)]
DATA_FILES = tree('btecli.plugins')
setup(data_files=DATA_FILES)