From e8e689acd1c009ddc1f9aa65f932e566b4cbc3ea Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Wed, 16 Apr 2014 22:59:28 +0600 Subject: [PATCH] fix scrapy.version_info when SCRAPY_VERSION_FROM_GIT is set --- scrapy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scrapy/__init__.py b/scrapy/__init__.py index 019179cfd84..353b3e263dd 100644 --- a/scrapy/__init__.py +++ b/scrapy/__init__.py @@ -6,7 +6,8 @@ __version__ = pkgutil.get_data(__package__, 'VERSION').strip() if not isinstance(__version__, str): __version__ = __version__.decode('ascii') -version_info = tuple(int(v) for v in __version__.split('.')[:3]) +version_info = tuple(int(v) if v.isdigit() else v + for v in __version__.split('.')) import sys, os, warnings