forked from scrapy/scrapyd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
52 lines (44 loc) · 1.5 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
import sys
try:
from setuptools import setup
using_setuptools = True
except ImportError:
from distutils.core import setup
using_setuptools = False
from os.path import join, dirname
if sys.version_info[:2] != (2, 7):
sys.exit('Python 2.7 is required for scrapyd')
with open(join(dirname(__file__), 'scrapyd/VERSION')) as f:
version = f.read().strip()
setup_args = {
'name': 'scrapyd',
'version': version,
'url': 'https://github.com/scrapy/scrapyd',
'description': 'A service for running Scrapy spiders, with an HTTP API',
'long_description': open('README.rst').read(),
'author': 'Scrapy developers',
'maintainer': 'Scrapy developers',
'maintainer_email': '[email protected]',
'license': 'BSD',
'packages': ['scrapyd'],
'include_package_data': True,
'zip_safe': False,
'classifiers': [
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: No Input/Output (Daemon)',
'Topic :: Internet :: WWW/HTTP',
],
}
if using_setuptools:
setup_args['install_requires'] = ['Twisted>=8.0', 'Scrapy>=0.17']
setup_args['entry_points'] = {'console_scripts': [
'scrapyd = scrapyd.scripts.scrapyd_run:main'
]}
else:
setup_args['scripts'] = ['scrapyd/scripts/scrapyd_run.py']
setup(**setup_args)