forked from siklosid/dagger
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
64 lines (49 loc) · 1.59 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
64
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from pathlib import Path
from setuptools import find_packages, setup
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
def strip_comments(l):
return l.split("#", 1)[0].strip()
def _pip_requirement(req, *root):
print(req)
if req.startswith("-r "):
_, path = req.split()
return reqs(*root, *path.split("/"))
return [req]
def _reqs(*f):
path = (Path.cwd() / "reqs").joinpath(*f)
with path.open() as fh:
reqs = [strip_comments(l) for l in fh.readlines()]
return [_pip_requirement(r, *f[:-1]) for r in reqs if r]
def reqs(*f):
return [req for subreq in _reqs(*f) for req in subreq]
install_requires = reqs("base.txt")
test_requires = reqs("test.txt") + install_requires
setup(
author="David Siklosi",
author_email="[email protected]",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
],
description="Config Driven ETL",
entry_points={"console_scripts": ["dagger=dagger.main:cli"]},
long_description=readme + "\n\n" + history,
include_package_data=True,
keywords="dagger",
name="dagger",
setup_requires=install_requires,
install_requires=install_requires,
test_suite="tests",
packages=find_packages(),
tests_require=test_requires,
url="https://gitlab.com/goflash1/data/dagger",
version="0.9.0",
zip_safe=False,
)