root/projects/whoosh/trunk/src/whoosh/__init__.py @ 409

Revision 409, 1.3 KB (checked in by matt, 7 months ago)

Added qparser package to setup.py.
Added Searcher.search_page() method and ResultsPage? object.
Fixed dumb mistake in scoring.Frequency.
Bumped version number.

Line 
1#===============================================================================
2# Copyright 2008 Matt Chaput
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#===============================================================================
16
17__version__ = (0, 3, 14)
18
19
20def versionstring(build=True, extra=True):
21    """Returns the version number of Whoosh as a string.
22   
23    :param build: Whether to include the build number in the string.
24    :param extra: Whether to include alpha/beta/rc etc. tags. Only
25        checked if build is True.
26    :rtype: str
27    """
28   
29    if build:
30        first = 3
31    else:
32        first = 2
33   
34    s = ".".join(str(n) for n in __version__[:first])
35    if build and extra:
36        s += "".join(str(n) for n in __version__[3:])
37   
38    return s
Note: See TracBrowser for help on using the browser.