From 3b00b9cb12afa097e55f51167614f0985816a482 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Sun, 11 Sep 2011 11:24:12 -0300 Subject: [PATCH 1/3] added support for generating version from git revision --- extras/makedeb.py | 4 +++- setup.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extras/makedeb.py b/extras/makedeb.py index 054204cf2..63410b2df 100644 --- a/extras/makedeb.py +++ b/extras/makedeb.py @@ -16,7 +16,9 @@ def build(suffix): with open(ifn, 'w') as of: of.write(s) - check_call('debchange -m -D unstable --force-distribution -v $(python setup.py --version)-r$(hg tip --template "{rev}")+$(date +%s) "Automatic build"', shell=True) + env={'SCRAPY_VERSION_FROM_GIT': '1'} + check_call('debchange -m -D unstable --force-distribution -v $(python setup.py --version)+$(date +%s) "Automatic build"', \ + shell=True, env=env) check_call('debuild -us -uc -b', shell=True) def clean(suffix): diff --git a/setup.py b/setup.py index e542cb65a..04d37f23c 100644 --- a/setup.py +++ b/setup.py @@ -86,6 +86,10 @@ if os.environ.get('SCRAPY_VERSION_FROM_HG'): rev = Popen(["hg", "tip", "--template", "{rev}"], stdout=PIPE).communicate()[0] with open('scrapy/__init__.py', 'a') as f: f.write("\n__version__ = '.'.join(map(str, version_info)) + '.%s'" % rev) +elif os.environ.get('SCRAPY_VERSION_FROM_GIT'): + rev = Popen("git log --oneline | wc -l", shell=True, stdout=PIPE).communicate()[0] + with open('scrapy/__init__.py', 'a') as f: + f.write("\n__version__ = '.'.join(map(str, version_info)) + '.%s'" % rev.strip()) version = __import__('scrapy').__version__ setup_args = { From 2fcb7097bdd75f0ba749d3f69e5f7115a2712251 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Wed, 14 Sep 2011 02:41:01 -0300 Subject: [PATCH 2/3] removed documentation header notifying about other documentation versions, as that's provided by readthedocs already --- docs/_static/scrapydoc.css | 13 ------------- docs/_templates/page.html | 26 -------------------------- 2 files changed, 39 deletions(-) delete mode 100644 docs/_templates/page.html diff --git a/docs/_static/scrapydoc.css b/docs/_static/scrapydoc.css index 9ec34edca..3e58a5e70 100644 --- a/docs/_static/scrapydoc.css +++ b/docs/_static/scrapydoc.css @@ -638,19 +638,6 @@ img.logo { border: 0; } -.docversion { - padding-top: 5px; - padding-bottom: 5px; -} - -.devdoc { - color: red; -} - -.stabledoc { - color: #777; -} - /* :::: PRINT :::: */ @media print { div.document, diff --git a/docs/_templates/page.html b/docs/_templates/page.html deleted file mode 100644 index f598fe4a3..000000000 --- a/docs/_templates/page.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "layout.html" %} -{% block body %} -
- -
- {% if version == "0.13" %} -

- This document is for Scrapy's development version, which can be - significantly different from previous releases. Get old docs here: - 0.12, - 0.10, - 0.9. - 0.8. - 0.7. -

- {% else %} -

- This document describes Scrapy {{ version }}. For development docs, - go here. -

- {% endif %} -
- -
- {{ body }} -{% endblock %} From fac5e5ea219a8c59022af1d90a10302125c67f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Sun, 18 Sep 2011 01:00:23 -0300 Subject: [PATCH 3/3] migrate hgignore to gitignore --- .hgignore => .gitignore | 2 -- 1 file changed, 2 deletions(-) rename .hgignore => .gitignore (70%) diff --git a/.hgignore b/.gitignore similarity index 70% rename from .hgignore rename to .gitignore index 076cc87c9..458ed7002 100644 --- a/.hgignore +++ b/.gitignore @@ -1,6 +1,4 @@ -syntax: glob *.pyc _trial_temp dropin.cache -.svn docs/build