-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathsetup.py
66 lines (52 loc) · 1.87 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
#!/usr/bin/env python
import glob
import os
import sys
from setuptools import setup, find_packages
def get_requires():
requires = ['psutil>=2.0.0']
if sys.platform.startswith('win'):
requires += ['colorconsole']
if sys.version_info < (2, 7):
requires += ['argparse']
return requires
def get_data_files():
data_files = [
('share/doc/' + __appname__, ['AUTHORS', 'COPYING', 'NEWS', 'README.md']),
('share/man/man1', ['man/' + __appname__ + ".1"])
]
if hasattr(sys, 'real_prefix') or 'bsd' in sys.platform:
conf_path = os.path.join(sys.prefix, 'etc', __appname__)
elif not hasattr(sys, 'real_prefix') and 'linux' in sys.platform:
conf_path = os.path.join('/etc', __appname__)
elif 'darwin' in sys.platform:
conf_path = os.path.join('/usr/local', 'etc', __appname__)
elif 'win32' in sys.platform:
conf_path = os.path.join(os.environ.get('APPDATA'), __appname__)
data_files.append((conf_path, ['conf/' + __appname__ + '.conf']))
return data_files
__appname__ = "python-scripts"
setup(
### Metadata
name = __appname__,
version = '0.1.0',
description = 'Useful python scripts.',
long_description = open('README.md').read(),
url = 'https://github.com/soarpenguin/python-scripts',
#download_url = 'https://github.com/soarpenguin/python-scripts/'
license = 'GPL',
author = 'soarpenguin',
author_email = '[email protected]',
maintainer = 'soarpenguin',
maintainer_email = '[email protected]',
### Dependencies
install_requires = get_requires(),
#packages = ["logging"],
packages = find_packages(),
include_package_data = True,
data_files = get_data_files(),
#test_suite="unitest.py",
#entry_points={"console_scripts": ["glances=glances:main"]},
### Contents
#packages = find_packages(exclude=['tests*']),
)