-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.py
39 lines (28 loc) · 993 Bytes
/
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
"""This module contains the packaging routine for the pybook package"""
from setuptools import setup, find_packages
try:
from pip.download import PipSession
from pip.req import parse_requirements
except ImportError:
# It is quick hack to support pip 10 that has changed its internal
# structure of the modules.
from pip._internal.download import PipSession
from pip._internal.req.req_file import parse_requirements
def get_requirements(source):
"""Get the requirements from the given ``source``
Parameters
----------
source: str
The filename containing the requirements
"""
install_reqs = parse_requirements(filename=source, session=PipSession())
return [str(ir.req) for ir in install_reqs]
setup(
packages=find_packages(),
install_requires=get_requirements('requirements/requirements.txt'),
entry_points={
'console_scripts': [
'scrapyp = scrapy_puppeteer.cli:__main__',
],
}
)