-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
106 lines (90 loc) · 2.99 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
from __future__ import print_function
from setuptools import setup
import os, sys
import shutil
NAME = "sendgrowl"
def get_version():
"""Get version and version_info without importing the entire module."""
# print("NAME:", NAME)
path = os.path.join(os.path.dirname(__file__), NAME, '__meta__.py')
if sys.version_info.major == 3:
import importlib.util
spec = importlib.util.spec_from_file_location("__meta__", path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
vi = module.__version_info__
return vi._get_canonical(), vi._get_dev_status()
else:
import imp
vi = imp.load_source("meat", "__meta__.py")
return vi.__version__, vi.__status__
def get_requirements(req):
"""Load list of dependencies."""
install_requires = []
with open(req) as f:
for line in f:
if not line.startswith("#"):
install_requires.append(line.strip())
return install_requires
def get_description():
"""Get long description."""
desc = ''
if os.path.isfile('README.md'):
with open("README.md", 'r') as f:
desc = f.read()
return desc
VER, DEVSTATUS = get_version()
try:
os.remove(os.path.join(NAME, '__version__.py'))
except:
pass
shutil.copy2('__version__.py', NAME)
import __version__
version = __version__.version
if sys.version_info.major == 3:
entry_points = {
"console_scripts": ["sendgrowl3 = sendgrowl:usage","sendgrowl = sendgrowl:usage"]
}
else:
entry_points = {
"console_scripts": ["sendgrowl = growl:usage",]
}
setup(
name=NAME,
version=version,
author = 'Hadi Cahyadi LD',
author_email = 'cumulus13@gmail.com',
maintainer="cumulus13 Team",
maintainer_email="cumulus13@gmail.com",
description = ('simple send notify to growl with multiple host and port'),
license = 'MIT',
keywords = "growl windows linux gntp gntplib 23053",
url = 'https://github.com/cumulus13/sendgrowl',
project_urls={
"Documentation": "https://github.com/cumulus13/sendgrowl",
"Code": "https://github.com/cumulus13/sendgrowl",
},
packages = ['sendgrowl'],
download_url = 'https://github.com/cumulus13/sendgrowl/tarball/master',
install_requires=[
'gntplib',
'argparse',
'configset',
'pydebugger'
],
entry_points = entry_points,
package_data={'': ['__version__.py', 'growl.png', 'growl.ini']},
include_package_data=True,
python_requires=">=3.0",
classifiers=[
'Development Status :: %s' % DEVSTATUS,
'Environment :: Console',
"Intended Audience :: Developers",
'License :: OSI Approved :: MIT License',
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
'Topic :: Software Development :: Libraries :: Python Modules'
],
long_description=get_description(),
long_description_content_type="text/markdown",
)