|
1 | 1 | # -*- coding: utf-8 -*- |
| 2 | +# This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | +# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | +# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
2 | 5 |
|
3 | | -from setuptools import find_packages |
4 | | -from setuptools import setup |
| 6 | +import setuptools |
5 | 7 |
|
6 | | -setup( |
7 | | - name="firefox_code_coverage", |
8 | | - version="1.0.0", |
| 8 | + |
| 9 | +def read_requirements(file_): |
| 10 | + lines = [] |
| 11 | + with open(file_) as f: |
| 12 | + for line in f.readlines(): |
| 13 | + line = line.strip() |
| 14 | + if line.startswith("https://"): |
| 15 | + line = line.split("#")[1].split("egg=")[1] |
| 16 | + elif line == "" or line.startswith("#") or line.startswith("-"): |
| 17 | + continue |
| 18 | + line = line.split("#")[0].strip() |
| 19 | + lines.append(line) |
| 20 | + return sorted(list(set(lines))) |
| 21 | + |
| 22 | + |
| 23 | +with open("VERSION") as f: |
| 24 | + VERSION = f.read().strip() |
| 25 | + |
| 26 | + |
| 27 | +setuptools.setup( |
| 28 | + name="firefox-code-coverage", |
| 29 | + version=VERSION, |
9 | 30 | description="Code Coverage Report generator for Firefox", |
10 | | - packages=find_packages(exclude=["contrib", "docs", "tests"]), |
| 31 | + author="Mozilla Release Management Analysis (sallt)", |
| 32 | + author_email="release-mgmt-analysis@mozilla.com", |
| 33 | + url="https://github.com/mozilla/code-coverage", |
| 34 | + tests_require=read_requirements("test-requirements.txt"), |
| 35 | + install_requires=read_requirements("requirements.txt"), |
| 36 | + packages=setuptools.find_packages(), |
| 37 | + include_package_data=True, |
| 38 | + zip_safe=False, |
11 | 39 | license="MPL2", |
| 40 | + entry_points={ |
| 41 | + "console_scripts": [ |
| 42 | + "firefox-code-coverage = firefox_code_coverage.codecoverage:main" |
| 43 | + ] |
| 44 | + }, |
12 | 45 | ) |
0 commit comments