-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (56 loc) · 1.36 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
"""
reddit-api
"""
from setuptools import setup, find_packages
import re
NAME = 'reddit_api'
PATH_MODULES = 'src/reddit_api'
LONG_DESCRIPTION = 'reddit-api is a open source package that manipulate RedditAPI output and use it in ETL tasks'
def get_version():
# Read the file and return the version
with open(f"{PATH_MODULES}/__init__.py") as f:
version = re.search(r'__version__ = "([^"]+)"', f.read())
if version:
return version.group(1)
else:
return None
# Use the get_version function to retrieve the version
version = get_version()
setup(
name=NAME,
version=version,
packages=find_packages(where='src'),
description='Reddit API for Airflow',
long_description=LONG_DESCRIPTION,
author='Unknwon',
install_requires=[
'praw',
'yake',
'pandas',
'praw',
'yake',
'pyarrow',
'colorlog'
],
extras_require={
'dev': [
'pytest',
'pytest-cov',
'flake8',
'black',
'isort',
'mypy',
'pylint',
'pre-commit',
'tox',
'twine',
'wheel',
]
},
package_dir={"": "src"},
entry_points={
'console_scripts': [
'airflow_reddit=airflow_reddit.cli:main',
],
},
)