-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
41 lines (36 loc) · 1.53 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
"""Setup script."""
from pathlib import Path
import re
import setuptools
if __name__ == "__main__":
# Read metadata from version.py
with Path("fromconfig/version.py").open(encoding="utf-8") as file:
metadata = dict(re.findall(r'__([a-z]+)__\s*=\s*"([^"]+)"', file.read()))
# Read description from README
with Path(Path(__file__).parent, "docs/README.md").open(encoding="utf-8") as file:
long_description = file.read()
# Run setup
setuptools.setup(
author=metadata["author"],
version=metadata["version"],
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
],
data_files=[(".", ["requirements.txt", "docs/README.md"])],
dependency_links=[],
description="A library to instantiate any Python object from configuration files",
entry_points={"console_scripts": ["fromconfig = fromconfig.cli.main:main"]},
install_requires=["fire", "omegaconf", "pyyaml"],
long_description=long_description,
long_description_content_type="text/markdown",
name="fromconfig",
packages=setuptools.find_packages(),
tests_require=["pytest"],
url="https://github.com/criteo/fromconfig",
)