python - How to include additional files and directory in egg while deploying Scrapy project -


i have scrapy project, want deploy using scrapyd-deploy or scrapy deploy command line tool. went well, notice doesn't include additional file in package. example have file sources/sourcelist.csv in spider directory. doesn't seems include package. how can force deploy script include that.

in short can include additional files using scrapy deploy. in long, can. have create egg , upload egg.

first, create egg. create or edit setup.py exists in project root. should below:

from setuptools import setup, find_packages  setup(     name         = 'project',     version      = '1.0',     packages     = find_packages(),     entry_points = {'scrapy': ['settings = ozbot.settings']},     include_package_data = true ) 

notice include_package_data = true line.

second, create distribution egg.

$python setup.py bdist_egg 

third, deploy egg

$scrapy deploy dist/your_egg_file.egg 

make sure replace your_egg_file.egg right file name


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -