forked from mozilla-releng/balrog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (34 loc) · 1.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
import six
from os import path
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
# We're using a pip8 style requirements file, which allows us to embed hashes
# of the packages in it. However, setuptools doesn't support parsing this type
# of file, so we need to strip those out before passing the requirements along
# to it.
with open(path.join(here, 'requirements.txt')) as f:
requirements = []
for line in f:
# Skip lines with hash values
if not line.strip().startswith("--"):
version_skip = [
"python_version=='2.7'" in line and not six.PY2,
"python_version=='3.6'" in line and not six.PY3
]
if any(version_skip):
continue
requirements.append(line.split(';')[0].split()[0])
with open(path.join(here, "version.txt")) as f:
version = f.read()
setup(
name="balrog",
version=version,
description="Mozilla's Update Server",
author="Ben Hearsum",
author_email="[email protected]",
packages=find_packages(exclude=["vendor"]),
include_package_data=True,
install_requires=requirements,
url="https://github.com/mozilla/balrog",
license="MPL-2.0",
)