From 132557dd140fb873c6169d2c3364a5edf8186119 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Wed, 16 Sep 2009 22:40:36 -0300 Subject: [PATCH] some deployment changes in preparation for the 0.7.0 release candidate --- MANIFEST.in | 5 ++++- docs/conf.py | 7 ++++++- docs/topics/scrapy-ctl.rst | 4 ++-- scrapy/__init__.py | 3 ++- scrapy/tests/test_cmdline/__init__.py | 3 +++ scrapy/tests/test_commands.py | 5 ++++- setup.py | 6 +++--- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 154817ec8..28916dffa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,8 +3,11 @@ include AUTHORS include INSTALL include LICENSE include MANIFEST.in +include scrapy/core/downloader/responsetypes/mime.types +recursive-include scrapy/templates * +recursive-include scrapy/tests/sample_data * recursive-include docs * +prune docs/build recursive-include scripts * -recursive-include examples * recursive-include extras * recursive-include bin * diff --git a/docs/conf.py b/docs/conf.py index 0ca88f9a5..e97af3aff 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,7 +49,12 @@ copyright = u'2008-2009, Insophia' # built documents. # # The short X.Y version. -version = '0.7.0' +try: + import scrapy + version = scrapy.__version__ +except ImportError: + version = '' + # The full version, including alpha/beta/rc tags. release = version diff --git a/docs/topics/scrapy-ctl.rst b/docs/topics/scrapy-ctl.rst index 411659ba9..a59b87a5c 100644 --- a/docs/topics/scrapy-ctl.rst +++ b/docs/topics/scrapy-ctl.rst @@ -63,7 +63,7 @@ The first line will print the currently active project (if any). Example (active project):: - Scrapy 0.7.0 - project: myproject + Scrapy X.X.X - project: myproject Usage ===== @@ -72,7 +72,7 @@ Example (active project):: Example (no active project):: - Scrapy 0.7.0 - no active project + Scrapy X.X.X - no active project Usage ===== diff --git a/scrapy/__init__.py b/scrapy/__init__.py index 0edf0f153..f9f348332 100644 --- a/scrapy/__init__.py +++ b/scrapy/__init__.py @@ -3,7 +3,8 @@ Scrapy - a screen scraping framework written in Python """ # IMPORTANT: remember to also update the version in docs/conf.py -__version__ = "0.7.0" +version_info = (0, 7, 0, 'candidate', 0) +__version__ = "0.7.0-rc1" import sys, os diff --git a/scrapy/tests/test_cmdline/__init__.py b/scrapy/tests/test_cmdline/__init__.py index 40c51dc5e..671b8f2fb 100644 --- a/scrapy/tests/test_cmdline/__init__.py +++ b/scrapy/tests/test_cmdline/__init__.py @@ -3,10 +3,13 @@ import os from subprocess import Popen, PIPE import unittest +import scrapy + class CmdlineTest(unittest.TestCase): def setUp(self): self.env = os.environ.copy() + self.env['PYTHONPATH'] = os.path.dirname(scrapy.__path__[0]) self.env.pop('SCRAPY_SETTINGS_DISABLED', None) self.env['SCRAPY_SETTINGS_MODULE'] = 'scrapy.tests.test_cmdline.settings' diff --git a/scrapy/tests/test_commands.py b/scrapy/tests/test_commands.py index ee489db87..cb4e5ced1 100644 --- a/scrapy/tests/test_commands.py +++ b/scrapy/tests/test_commands.py @@ -1,11 +1,13 @@ import sys import os import subprocess -from os.path import exists, join +from os.path import exists, join, dirname from shutil import rmtree from tempfile import mkdtemp import unittest +import scrapy + class ProjectTest(unittest.TestCase): project_name = 'testproject' @@ -16,6 +18,7 @@ class ProjectTest(unittest.TestCase): self.proj_path = join(self.temp_path, self.project_name) self.proj_mod_path = join(self.proj_path, self.project_name) self.env = os.environ.copy() + self.env['PYTHONPATH'] = dirname(scrapy.__path__[0]) def tearDown(self): rmtree(self.temp_path) diff --git a/setup.py b/setup.py index d6d9cf673..c5fb95ef2 100644 --- a/setup.py +++ b/setup.py @@ -81,14 +81,14 @@ if u'SVN' in version: version = ' '.join(version.split(' ')[:-1]) setup( - name = 'Scrapy', + name = 'scrapy', version = version, url = 'http://scrapy.org', - download_url = "http://scrapy.org/releases/scrapy-0.7.0.tar.gz", description = 'A high-level Python Screen Scraping framework', long_description = 'Scrapy is a high level scraping and web crawling framework for writing spiders to crawl and parse web pages for all kinds of purposes, from information retrieval to monitoring or testing web sites.', author = 'Scrapy developers', - author_email = '', + maintainer = 'Pablo Hoffman', + maintainer_email = 'pablo@pablohoffman.com', license = 'BSD', packages = packages, cmdclass = cmdclasses,