Zack Williams | 712caf6 | 2020-04-28 13:37:41 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | from __future__ import absolute_import |
| 7 | from setuptools import setup |
| 8 | |
| 9 | |
| 10 | def version(): |
| 11 | with open("VERSION") as f: |
| 12 | return f.read() |
| 13 | |
| 14 | |
| 15 | def parse_requirements(filename): |
| 16 | # parse a requirements.txt file, allowing for blank lines and comments |
| 17 | requirements = [] |
| 18 | for line in open(filename): |
| 19 | if line and not line.startswith("#"): |
| 20 | requirements.append(line) |
| 21 | return requirements |
| 22 | |
| 23 | |
| 24 | setup( |
| 25 | name="sjsg", |
| 26 | version=version(), |
| 27 | description="Static Jenkins Site Generator", |
| 28 | author="Open Networking Foundation", |
| 29 | author_email="support@opennetworking.org", |
| 30 | license="Apache v2", |
| 31 | install_requires=parse_requirements("requirements.txt"), |
| 32 | classifiers=[ |
| 33 | "License :: OSI Approved :: Apache Software License", |
| 34 | "Programming Language :: Python :: 3.7", |
| 35 | ], |
| 36 | ) |