scrapinghub / scrapinghub-entrypoint-scrapy

Scrapy entrypoint for Scrapinghub job runner
BSD 3-Clause "New" or "Revised" License
25 stars 16 forks source link

Scripts not working when using pip install #63

Open Gallaecio opened 2 years ago

Gallaecio commented 2 years ago

pip is the preferred installer program.

However, when I use pip install . instead of python setup.py install, the declared scripts do not seem to be exposed to Scrapy Cloud, and when I try to execute them nonetheless I get:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 148, in _run_usercode
    _run(args, settings)
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 105, in _run
    _run_pkgscript(args)
  File "/usr/local/lib/python3.10/site-packages/sh_scrapy/crawl.py", line 128, in _run_pkgscript
    d.run_script(scriptname, {'__name__': '__main__'})
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1436, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/history.py' not found in metadata at '/usr/local/lib/python3.10/site-packages/Veritec-1.0.0.dist-info'