forked from fedora-infra/mirrormanager2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
75 lines (63 loc) · 2.22 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
#!/usr/bin/env python
"""
Setup script
"""
# Required to build on EL6
__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources
import re
from setuptools import setup
with open('mirrormanager2/__init__.py') as stream:
__version__ = re.compile(
r".*__version__ = '(.*?)'", re.S
).match(stream.read()).group(1)
def get_requirements(requirements_file='requirements.txt'):
"""Get the contents of a file listing the requirements.
:arg requirements_file: path to a requirements file
:type requirements_file: string
:returns: the list of requirements, or an empty list if
`requirements_file` could not be opened or read
:return type: list
"""
lines = open(requirements_file).readlines()
return [
line.strip().split('#')[0]
for line in lines
if not line.startswith('#')
]
setup(
name='mirrormanager2',
description='MirrorManager2 is the application used to managed the Fedora '
'mirrors all over the world.',
version=__version__,
author='Fedora Infrastructure team',
author_email='[email protected]',
maintainer='Pierre-Yves Chibon',
maintainer_email='[email protected]',
license='MIT',
download_url='https://fedorahosted.org/releases/m/i/mirrormanager/',
url='https://fedorahosted.org/mirrormanager/',
packages=['mirrormanager2'],
include_package_data=True,
install_requires=get_requirements() + get_requirements(
'requirements_mirrorlist.txt'),
scripts = [
'client/report_mirror',
'mirrorlist/mirrorlist_statistics',
'utility/mm2_crawler',
'utility/mm2_emergency-expire-repo',
'utility/mm2_generate-worldmap',
'utility/mm2_get_global_netblocks',
'utility/mm2_get_internet2_netblocks',
'utility/mm2_move-devel-to-release',
'utility/mm2_move-to-archive',
'utility/mm2_propagation',
'utility/mm2_refresh_mirrorlist_cache',
'utility/mm2_update-EC2-netblocks',
'utility/mm2_update-master-directory-list',
'utility/mm2_umdl2',
'utility/mm2_update-mirrorlist-server',
'utility/mm2_create_install_repo',
'utility/mm2_upgrade-install-repo',
],
)