forked from drivendataorg/cloudpathlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (55 loc) · 2.11 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
63
#!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
from itertools import chain
from pathlib import Path
def load_requirements(path: Path):
requirements = []
with path.open("r") as fp:
for line in fp.readlines():
if line.startswith("-r"):
requirements += load_requirements(line.split(" ")[1].strip())
else:
requirement = line.strip()
if requirement and not requirement.startswith("#"):
requirements.append(requirement)
return requirements
readme = Path("README.md").read_text(encoding="UTF-8")
extra_reqs = {}
for req_path in (Path(__file__).parent / "requirements").glob("*.txt"):
if req_path.stem == "base":
base_reqs = load_requirements(req_path)
continue
if req_path.stem == "all":
raise ValueError("'all' is a reserved keyword and can't be used for a cloud provider key")
extra_reqs[req_path.stem] = load_requirements(req_path)
extra_reqs["all"] = list(chain(*extra_reqs.values()))
setup(
author="DrivenData",
author_email="info@drivendata.org",
python_requires=">=3.6",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
description=("pathlib-style classes for cloud storage services"),
extras_require=extra_reqs,
install_requires=base_reqs,
long_description=readme,
long_description_content_type="text/markdown",
include_package_data=True,
name="cloudpathlib",
packages=find_packages(),
project_urls={
"Bug Tracker": "https://github.com/drivendataorg/cloudpathlib/issues",
"Documentation": "https://cloudpathlib.drivendata.org/",
"Source Code": "https://github.com/drivendataorg/cloudpathlib",
},
url="https://github.com/drivendataorg/cloudpathlib",
version="0.3.0",
)