forked from adfinis/pyaptly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
78 lines (70 loc) · 2.35 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
"""Setuptools package definition"""
from setuptools import setup
from setuptools import find_packages
import os
__version__ = None
version_file = "pyaptly/version.py"
with open(version_file) as f:
code = compile(f.read(), version_file, 'exec')
exec(code)
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 open('README.rst', 'r') as f:
README_TEXT = f.read()
setup(
name = "pyaptly",
version = __version__,
packages = find_packages(),
package_data=find_data(
find_packages(), ["yml"]
),
entry_points = {
'console_scripts': [
"pyaptly = pyaptly:main",
]
},
install_requires = [
"pyyaml",
"freeze",
"six"
],
author = "Adfinis-SyGroup",
author_email = "https://adfinis-sygroup.ch/",
description = "Aptly mirror/snapshot managment automation.",
long_description = README_TEXT,
keywords = "aptly mirror snapshot automation",
url = "https://github.com/adfinis-sygroup/pyaptly",
classifiers = [
"Development Status :: 5 - Production/Stable",
"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 :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
]
)