-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
62 lines (49 loc) · 1.68 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
#!/usr/bin/env python
"""Setups Hal"""
import os
from setuptools import setup, find_packages
def get_version_details(path):
"""Parses version file
:param path: path to version file
:return: version details
"""
with open(path, "r") as reader:
lines = reader.readlines()
data = {
line.split(" = ")[0].replace("__", ""):
line.split(" = ")[1].strip().replace("'", "")
for line in lines
}
return data
# folders
HERE = os.path.abspath(os.path.dirname(__file__))
SRC_FOLDER = os.path.join(HERE, "hal")
# version
VERSION_FILE = os.path.join(SRC_FOLDER, "__version__.py")
VERSION = get_version_details(VERSION_FILE)
# descriptions
LITTLE_DESCRIPTION = VERSION["description"]
DESCRIPTION = \
"HAL\n" + LITTLE_DESCRIPTION + "\n\
Requirements\n\
- $ pip install -r https://raw.githubusercontent.com/sirfoga/pyhal/master/requirements.txt\n\
Dev requirements\n\
- $ pip install -r https://raw.githubusercontent.com/sirfoga/pyhal/master/requirements_dev.txt\n\
Install\n\
- $ make install, with pipenv\n\
- $ make pip-install, with pip\n\
- $ pip install PyHal, via pip\n\
- $ pip install git+https://github.com/sirfoga/pyhal/, via for the latest release\n\
Questions and issues\n\
The Github issue tracker is only for bug reports and feature requests."
setup(
name=VERSION["title"],
version=VERSION["version"],
author=VERSION["author"],
author_email=VERSION["author_email"],
description=LITTLE_DESCRIPTION,
long_description=DESCRIPTION,
keywords="hal library general-purpose",
url=VERSION["url"],
packages=find_packages(exclude=["tests"]),
)