1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-26 19:03:53 +00:00

scrapy deploy: retry setup.py bdist_egg on EINTR. closes #9

This commit is contained in:
Pablo Hoffman 2012-09-07 15:40:26 -03:00
parent 3c05fbb6a9
commit 1e2efe5664

View File

@ -15,6 +15,7 @@ from w3lib.form import encode_multipart
from scrapy.command import ScrapyCommand
from scrapy.exceptions import UsageError
from scrapy.utils.http import basic_auth_header
from scrapy.utils.python import retry_on_eintr
from scrapy.utils.conf import get_config, closest_scrapy_cfg
_SETUP_PY_TEMPLATE = \
@ -206,7 +207,7 @@ def _build_egg():
_create_default_setup_py(settings=settings)
d = tempfile.mkdtemp()
f = tempfile.TemporaryFile(dir=d)
check_call([sys.executable, 'setup.py', 'clean', '-a', 'bdist_egg', '-d', d], stdout=f)
retry_on_eintr(check_call, [sys.executable, 'setup.py', 'clean', '-a', 'bdist_egg', '-d', d], stdout=f)
egg = glob.glob(os.path.join(d, '*.egg'))[0]
return egg, d