-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (63 loc) · 2.23 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
65
66
67
68
69
70
71
72
#!/usr/bin/env python
#
# Copyright (C) Abraham Aondowase Yusuf - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
# This file is subject to the terms and conditions defined in
# file 'LICENSE', which is part of this source code package.
# Written by Abraham Aondowase Yusuf <[email protected]>, April 2018
import os
import uuid
from setuptools import find_packages, setup
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
def parse_requirements():
"""Naively parse the requirements.txt file"""
BASE_DIR = os.path.realpath(os.path.dirname(__file__))
requirements_file = os.path.join(BASE_DIR, "requirements.txt")
requirements = None
with open(requirements_file) as rf:
requirements = [line.strip() for line in rf.readlines() if line.strip()]
return requirements
params = {
"name": "webcrawler",
"version": "2.1.3",
"description": "A web crawler bot",
"author": "Abraham Aondowase Yusuf",
"author_email": "[email protected]",
"license": read("LICENSE"),
"url": "https://gitlab.com/abrahamy/webcrawler",
"packages": find_packages(exclude=["tests/*"]),
"package_dir": {
"webcrawler": "webcrawler",
"webcrawler.api": "webcrawler/api",
"webcrawler.spiders": "webcrawler/spiders",
},
"package_data": {
"webcrawler": [
"build.sh",
"docker-compose.sample.yml",
"Dockerfile",
"entrypoint.sh",
"LICENSE",
"README.md",
"requirements.txt",
"scrapy.cfg",
"config/supervisord.conf",
"config/uwsgi.yml",
"config/webcrawler.service",
]
},
"entry_points": {"console_scripts": ["start_crawl = webcrawler.__main__:main"]},
"zip_safe": True,
"install_requires": parse_requirements(),
"classifiers": [
"Development Status :: 5 - Production/Stable",
"License :: Other/Proprietary License",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Topic :: Software Development",
],
}
setup(**params)