| Line | |
|---|
| 1 | """ |
|---|
| 2 | Scrapy - a screen scraping framework written in Python |
|---|
| 3 | """ |
|---|
| 4 | |
|---|
| 5 | version_info = (0, 10, 0, '') |
|---|
| 6 | __version__ = "0.10" |
|---|
| 7 | |
|---|
| 8 | import sys, os, warnings |
|---|
| 9 | |
|---|
| 10 | if sys.version_info < (2,5): |
|---|
| 11 | print "Scrapy %s requires Python 2.5 or above" % __version__ |
|---|
| 12 | sys.exit(1) |
|---|
| 13 | |
|---|
| 14 | # ignore noisy twisted deprecation warnings |
|---|
| 15 | warnings.filterwarnings('ignore', category=DeprecationWarning, module='twisted') |
|---|
| 16 | |
|---|
| 17 | # prevents noisy (and innocent) dropin.cache errors when loading spiders from |
|---|
| 18 | # egg files using the old Spider Manager. TODO: Remove for Scrapy 0.11 |
|---|
| 19 | from twisted.python.zippath import ZipPath |
|---|
| 20 | ZipPath.setContent = lambda x, y: None |
|---|
| 21 | |
|---|
| 22 | # monkey patches to fix external library issues |
|---|
| 23 | from scrapy.xlib import twisted_250_monkeypatches, urlparse_monkeypatches |
|---|
| 24 | |
|---|
| 25 | # optional_features is a set containing Scrapy optional features |
|---|
| 26 | optional_features = set() |
|---|
| 27 | |
|---|
| 28 | try: |
|---|
| 29 | import OpenSSL |
|---|
| 30 | except ImportError: |
|---|
| 31 | pass |
|---|
| 32 | else: |
|---|
| 33 | optional_features.add('ssl') |
|---|
| 34 | |
|---|
| 35 | try: |
|---|
| 36 | import boto |
|---|
| 37 | except ImportError: |
|---|
| 38 | pass |
|---|
| 39 | else: |
|---|
| 40 | optional_features.add('boto') |
|---|