diff --git a/scrapyd/scripts/__init__.py b/scrapyd/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/bin/scrapyd-deploy b/scrapyd/scripts/scrapy_deploy.py similarity index 100% rename from bin/scrapyd-deploy rename to scrapyd/scripts/scrapy_deploy.py diff --git a/bin/scrapyd b/scrapyd/scripts/scrapyd_run.py similarity index 57% rename from bin/scrapyd rename to scrapyd/scripts/scrapyd_run.py index 6a5ce1a6..4540658e 100755 --- a/bin/scrapyd +++ b/scrapyd/scripts/scrapyd_run.py @@ -4,5 +4,8 @@ from os.path import join, dirname from sys import argv import scrapyd -argv[1:1] = ['-n', '-y', join(dirname(scrapyd.__file__), 'txapp.py')] -run() + + +def main(): + argv[1:1] = ['-n', '-y', join(dirname(scrapyd.__file__), 'txapp.py')] + run() diff --git a/setup.py b/setup.py index 3bbac76a..aff28a98 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ 'maintainer_email': 'info@scrapy.org', 'license': 'BSD', 'packages': ['scrapyd'], - 'scripts': ['bin/scrapyd', 'bin/scrapyd-deploy'], + # 'scripts': ['bin/scrapyd', 'bin/scrapyd-deploy'], 'include_package_data': True, 'zip_safe': False, 'classifiers': [ @@ -28,6 +28,11 @@ 'Environment :: No Input/Output (Daemon)', 'Topic :: Internet :: WWW/HTTP', ], + 'entry_points': '''\ + [console_scripts] + scrapyd = scrapyd.scripts.scrapyd_run:main + scrapy-deploy = scrapyd.scripts.scrapy_deploy:main + ''' } try: