Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·68 lines (58 loc) · 2.12 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·68 lines (58 loc) · 2.12 KB
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
"""igvm - Setup
Copyright (c) 2024 InnoGames GmbH
"""
import re
from setuptools import setup
from igvm import VERSION
# igvm runs with either modern "fabric" or legacy "fabric3" through
# igvm.fabric_compat, so we deliberately do not hard-depend on one specific
# fabric. requirements.txt still installs modern fabric for pip-based dev
# setups; the Debian package expresses the choice as the alternative
# dependency "python3-fabric | python3-fabric3" (see --depends3 in the deb
# build). Without this, dh_python3 would turn the requirements.txt entry into
# a strict "python3-fabric" dependency and the .deb would refuse to install on
# fabric3-only hosts.
_EXCLUDE_FROM_INSTALL_REQUIRES = {'fabric', 'fabric3'}
def install_requires():
# This isn't the recommended way because install_requires and
# requirements.txt are for different things but in our case this
# is the bare minimum we need.
#
# See: https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements
with open('requirements.txt') as f:
requirements = []
for line in f:
dist_name = re.split(r'[<>=~!;@\[ ]', line.strip(), maxsplit=1)[0]
if dist_name.lower() in _EXCLUDE_FROM_INSTALL_REQUIRES:
continue
requirements.append(line)
return requirements
setup(
name='igvm',
version='.'.join(str(v) for v in VERSION),
packages=['igvm'],
entry_points={
'console_scripts': [
'igvm=igvm.cli:main',
],
},
package_data={
'igvm': [
'templates/aws_user_data.cfg',
'templates/domain.xml',
'templates/etc/network/interfaces',
'templates/etc/fstab',
'templates/etc/hosts',
'templates/etc/inittab',
'templates/etc/resolv.conf',
'scripts/ssh_wrapper',
]
},
author='InnoGames System Administration',
author_email='it@innogames.com',
license='MIT',
platforms='POSIX',
description='InnoGames VM Provisioning Tool',
url='https://github.com/innogames/igvm',
install_requires=install_requires(),
)