From 4cd1fa9c32715d102a79e98eed9ad783dc8a1def Mon Sep 17 00:00:00 2001 From: dgrana Date: Fri, 10 Jul 2009 05:29:27 +0100 Subject: [PATCH] generate dropin.cache for spiders under tests --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index e97f30735..65b928b8f 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,14 @@ if root_dir != '': os.chdir(root_dir) scrapy_dir = 'scrapy' +# Generate dropin.cache for spiders under tests +# if dropin.cache is missing, running tests under python site-packages fails with permission errors +import os +os.environ['SCRAPY_SETTINGS_DISABLED']='1' +from twisted.plugin import getPlugins, IPlugin +import scrapy.tests.test_spiders +list(getPlugins(IPlugin, scrapy.tests.test_spiders)) + def is_not_module(filename): return os.path.splitext(f)[1] not in ['.py', '.pyc', '.pyo']