Completed
Push — master ( 554eb6...d09592 )
by Oleksandr
13:38 queued 03:39
created

split_requirements()   A

Complexity

Conditions 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
# coding: utf-8
2
3
import os
4
5
from setuptools import setup
6
7
8
__here__ = os.path.abspath(os.path.dirname(__file__))
9
10
11
def split_requirements(lines):
12
    requirements, dependencies = [], []
13
14
    for line in lines:
15
        if line.startswith('-e'):
16
            line = line.split(' ', 1)[1]
17
            dependencies.append(line)
18
            line = line.split('#egg=', 1)[1]
19
20
        requirements.append(line)
21
22
    return requirements, dependencies
23
24
25
with open(os.path.join(__here__, 'requirements', 'dist.txt')) as f:
26
    REQUIREMENTS = [x.strip() for x in f]
27
    REQUIREMENTS = [x for x in REQUIREMENTS if x and not x.startswith('#')]
28
    REQUIREMENTS, DEPENDENCIES = split_requirements(REQUIREMENTS)
29
30
README = open(os.path.join(__here__, 'README.rst')).read()
31
32
33
setup(
34
    name='il2fb-ds-config',
35
    version='1.0.0',
36
    description='Library for working with settings of IL-2 FB Dedicated Server',
37
    long_description=README,
38
    keywords=[
39
        'il2', 'il-2', 'fb', 'forgotten battles', 'server', 'dedicated',
40
        'config', 'settings',
41
    ],
42
    license='LGPLv3',
43
    url='https://github.com/IL2HorusTeam/il2fb-ds-config',
44
    author='Alexander Oblovatniy',
45
    author_email='[email protected]',
46
    namespace_packages=[
47
        'il2fb',
48
        'il2fb.config',
49
    ],
50
    packages=[
51
        'il2fb.config.ds',
52
        'il2fb.config.ds.schemas',
53
        'il2fb.config.ds.schemas.anticheat',
54
    ],
55
    include_package_data=False,
56
    zip_safe=False,
57
    install_requires=REQUIREMENTS,
58
    dependency_links=DEPENDENCIES,
59
    classifiers=[
60
        'Development Status :: 5 - Production/Stable',
61
        'Intended Audience :: Developers',
62
        'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
63
        'Natural Language :: English',
64
        'Operating System :: OS Independent',
65
        'Programming Language :: Python :: 2.7',
66
        'Programming Language :: Python :: 3.4',
67
        'Programming Language :: Python :: 3.5',
68
        'Programming Language :: Python :: 3.6',
69
        'Topic :: Software Development :: Libraries',
70
    ],
71
)
72