This repository has been archived by the owner on Aug 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.templ
90 lines (79 loc) · 2.49 KB
/
setup.templ
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
"""Setuptools package definition"""
# PLEASE REMOVE UNUSED CODE like CustomInstallCommand if you don't use it
from setuptools import setup
from setuptools import find_packages
from setuptools.command.install import install
import codecs
import os
import sys
version = sys.version_info[0]
if version > 2:
pass
else:
pass
__version__ = None
version_file = "[[changeme]]/version.py"
with codecs.open(version_file, encoding="UTF-8") as f:
code = compile(f.read(), version_file, 'exec')
exec(code)
class CustomInstallCommand(install):
"""CustomInstallCommand"""
def run(self):
install.run(self)
def find_data(packages, extensions):
"""Finds data files along with source.
:param packages: Look in these packages
:param extensions: Look for these extensions
"""
data = {}
for package in packages:
package_path = package.replace('.', '/')
for dirpath, _, filenames in os.walk(package_path):
for filename in filenames:
for extension in extensions:
if filename.endswith(".%s" % extension):
file_path = os.path.join(
dirpath,
filename
)
file_path = file_path[len(package) + 1:]
if package not in data:
data[package] = []
data[package].append(file_path)
return data
with codecs.open('README.rst', 'r', encoding="UTF-8") as f:
README_TEXT = f.read()
setup(
name = "[[changeme]]",
version = __version__,
packages = find_packages(),
package_data=find_data(
find_packages(), ["json", "json.gz"]
),
entry_points = {
'console_scripts': [
]
},
install_requires = [
],
cmdclass = {
'install': CustomInstallCommand,
},
author = "Adfinis SyGroup AG",
author_email = "https://adfinis-sygroup.ch/",
description = "[[changeme]]",
long_description = README_TEXT,
keywords = "[[changeme]]",
url = "[[changeme]]",
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: "
"GNU Affero General Public License v3",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.4",
]
)