-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
83 lines (69 loc) · 2.3 KB
/
setup.py
File metadata and controls
83 lines (69 loc) · 2.3 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# coding: utf-8
import sys
from pathlib import Path
from setuptools import setup
__here__ = Path(__file__).parent.absolute()
def parse_requirements(file_path: Path):
requirements, dependencies = [], []
with open(file_path) as f:
for line in f:
line = line.strip()
if not line or line.startswith('#'):
continue
if line.startswith("-e"):
line = line.split(' ', 1)[1]
dependencies.append(line)
line = line.split("#egg=", 1)[1]
requirements.append(line)
elif line.startswith("-r"):
name = Path(line.split(' ', 1)[1])
path = file_path.parent / name
subrequirements, subdependencies = parse_requirements(path)
requirements.extend(subrequirements)
dependencies.extend(subdependencies)
else:
requirements.append(line)
return requirements, dependencies
README = open(__here__ / "README.rst").read()
REQUIREMENTS_FILE_NAME = (
"dist-windows.txt"
if sys.platform == "win32"
else "dist.txt"
)
REQUIREMENTS_FILE_PATH = __here__ / "requirements" / REQUIREMENTS_FILE_NAME
REQUIREMENTS, DEPENDENCIES = parse_requirements(REQUIREMENTS_FILE_PATH)
setup(
name="il2fb-heightmap-creator",
version="1.0.0",
description=(
"Distributed creator of height maps for "
"«IL-2 Sturmovik: Forgotten Battles»"
),
license="MIT",
url="https://github.com/IL2HorusTeam/il2fb-heightmap-creator",
author="Alexander Oblovatniy",
author_email="oblovatniy@gmail.com",
packages=[
"il2fb.maps.heightmaps",
],
namespace_packages=[
"il2fb",
"il2fb.maps",
],
include_package_data=True,
install_requires=REQUIREMENTS,
dependency_links=DEPENDENCIES,
classifiers=[
"Programming Language :: Python :: 3.6",
"Operating System :: Unix",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
],
entry_points={
'console_scripts': [
'il2fb-heightmap-create=il2fb.maps.heightmaps.creation:main',
'il2fb-heightmap-render=il2fb.maps.heightmaps.rendering:main',
],
}
)