You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/12/06 13:32:22 UTC
svn commit: r1417813 - in /incubator/bloodhound/trunk: bloodhound_search/
bloodhound_search/bhsearch/ bloodhound_search/bhsearch/templates/
bloodhound_search/bhsearch/tests/ installer/
Author: gjm
Date: Thu Dec 6 12:32:20 2012
New Revision: 1417813
URL: http://svn.apache.org/viewvc?rev=1417813&view=rev
Log:
adding skeleton for bloodhound search plugin - towards #285 (from andrej)
Added:
incubator/bloodhound/trunk/bloodhound_search/
incubator/bloodhound/trunk/bloodhound_search/CHANGES
incubator/bloodhound/trunk/bloodhound_search/MANIFEST.in
incubator/bloodhound/trunk/bloodhound_search/README
incubator/bloodhound/trunk/bloodhound_search/TESTING_README
incubator/bloodhound/trunk/bloodhound_search/bhsearch/
incubator/bloodhound/trunk/bloodhound_search/bhsearch/__init__.py
incubator/bloodhound/trunk/bloodhound_search/bhsearch/api.py
incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/
incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/bhsearch.html
incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/
incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/__init__.py
incubator/bloodhound/trunk/bloodhound_search/bhsearch/web_ui.py
incubator/bloodhound/trunk/bloodhound_search/setup.cfg
incubator/bloodhound/trunk/bloodhound_search/setup.py
Modified:
incubator/bloodhound/trunk/installer/bloodhound_setup.py
incubator/bloodhound/trunk/installer/requirements-dev.txt
Added: incubator/bloodhound/trunk/bloodhound_search/CHANGES
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/CHANGES?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/CHANGES (added)
+++ incubator/bloodhound/trunk/bloodhound_search/CHANGES Thu Dec 6 12:32:20 2012
@@ -0,0 +1,5 @@
+
+What's new in version 0.4.0
+---------------------------
+
+-
Added: incubator/bloodhound/trunk/bloodhound_search/MANIFEST.in
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/MANIFEST.in?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/MANIFEST.in (added)
+++ incubator/bloodhound/trunk/bloodhound_search/MANIFEST.in Thu Dec 6 12:32:20 2012
@@ -0,0 +1,4 @@
+
+include README CHANGES
+graft bhsearch/templates
+
Added: incubator/bloodhound/trunk/bloodhound_search/README
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/README?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/README (added)
+++ incubator/bloodhound/trunk/bloodhound_search/README Thu Dec 6 12:32:20 2012
@@ -0,0 +1,58 @@
+
+= Search and query plugin for Apache(TM) Bloodhound =
+
+
+== !ToDo ==
+
+
+== Dependencies ==
+
+This plugin depends on the following components to be installed:
+
+
+ - [http:trac.edgewall.org Trac] ,,Since version
+ ''' 1.0 ''',, .
+
+
+== Installation ==
+
+This plugin has been tested with
+[http://trac.edgewall.org/ Trac] .
+
+The first step to make it work is to [wiki:TracPlugins install this plugin]
+either for a particular environment or otherwise make it available to
+all the environments:
+
+{{{
+$ easy_install /path/to/unpacked/BloodhoundSearchPlugin-x.y.z.zip
+}}}
+
+,, where ''x.y.z'' is the version of the plugin,,
+
+... or alternately ...
+
+{{{
+$ easy_install BloodhoundSearchPlugin
+}}}
+
+In case of having internet connection and access to
+[http://pypi.python.org/pypi PyPI] or a similar repository, both these
+methods '''should''' automatically retrieve the [#Dependencies external
+dependencies] from there.
+
+== Configuration ==
+
+In order to enable [wiki:/En/Devel/BloodhoundSearchPlugin BloodhoundSearchPlugin] plugin,
+the only thing to do is to add the following lines to [wiki:TracIni trac.ini].
+
+{{{
+[components]
+bhsearch.* = enabled
+}}}
+
+== Bug / feature requests ==
+
+Existing bugs and feature requests for [wiki:/En/Devel/BloodhoundSearchPlugin BloodhoundSearchPlugin] are
+[query:status=new|assigned|reopened&keywords=~bep-0004 here].
+If you have any issues, please create a [/newticket?keywords=bep-0004 new ticket].
+
Added: incubator/bloodhound/trunk/bloodhound_search/TESTING_README
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/TESTING_README?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/TESTING_README (added)
+++ incubator/bloodhound/trunk/bloodhound_search/TESTING_README Thu Dec 6 12:32:20 2012
@@ -0,0 +1,49 @@
+
+= Testing Bloodhound Search plugin =
+
+== Overview ==
+
+This plugin makes use of `setuptools` `test` command. Therefore all
+test-support libraries needed to run the test suite should be installed
+automatically (... considering the fact that they are listed in
+`tests_require` and `install_requires` entries in `setup.ini` script ;).
+Recommended is the use of virtual Python environments.
+
+== How to run tests ==
+
+All tests are written in files under `bhsearch/tests` folder
+(sub-modules of `bhsearch.tests`) having names starting with prefix
+`test_`. The following command should be enough so as to run tests
+in one such module :
+
+{{{
+#!sh
+
+$ /path/to/python setup.py test -m bhsearch.tests.test_<something>
+
+}}}
+
+... where `<something>` should be replaced to match the name of an existing
+file containing tests e.g.
+
+{{{
+#!sh
+
+$ /path/to/python setup.py test -m bhsearch.tests.test_report
+
+}}}
+
+== Continuous integration ==
+
+*TODO*
+
+== How do we run tests ==
+
+At present members of the team run tests on their computers as mentioned below :
+
+ - ''Python'' '''2.6''' virtual environment , Trac '''1.0''' .
+
+Besides there's a whole continuous integration infrastructure behind the
+project (but that's TBD so far, should be documented later so that's in the
+*TODO* list).
+
Added: incubator/bloodhound/trunk/bloodhound_search/bhsearch/__init__.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/__init__.py?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/__init__.py (added)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/__init__.py Thu Dec 6 12:32:20 2012
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+r"""Improved search and query plugin for Apache(TM) Bloodhound
+
+Add free text search and query plugin to Bloodhound sites.
+"""
+
+# Ignore errors to avoid Internal Server Errors
+from trac.core import TracError
+TracError.__str__ = lambda self: unicode(self).encode('ascii', 'ignore')
+
+try:
+ from bhsearch import *
+ msg = 'Ok'
+except Exception, exc:
+# raise
+ msg = "Exception %s raised: '%s'" % (exc.__class__.__name__, str(exc))
+
Added: incubator/bloodhound/trunk/bloodhound_search/bhsearch/api.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/api.py?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/api.py (added)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/api.py Thu Dec 6 12:32:20 2012
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Core Bloodhound Search components"""
+
+from trac.core import *
+
+class BloodhoundQuerySystem(Component):
+ """Implements core query functionality.
+ """
+
+ def query(self, query, sort = None, boost = None, filters = None,
+ facets = None, start = 0, rows = None):
+ """Return query result from on underlying backend.
+
+ Arguments:
+ query -- query string e.g. âbla status:closedâ or a parsed
+ representation of the query.
+ sort -- optional sorting
+ boost -- optional list of fields with boost values e.g.
+ {âidâ: 1000, âsubjectâ :100, âdescriptionâ:10}.
+ filters -- optional list of terms. Usually can be cached by underlying
+ search framework. For example {âtypeâ: âwikiâ}
+ facets - optional list of facet terms, can be field or expression.
+ start, rows -- paging support
+
+ The result is returned as the following dictionary: {
+ "docs": [
+ {
+ "id": "ticket:123",
+ "resource_id": "123",
+ "type": "ticket",
+ ...
+ }
+ ],
+ "numFound":3,"
+ "start":0,
+ "facet_counts":{
+ "facet_fields":{
+ "cat":[ "electronics",3, "card",2, "graphics",2, "music",1]
+ }
+ },
+ }
+ """
+ self.env.log.debug("Receive query request: %s", locals())
+
+ #TODO: add implementation here
+ dummy_result = dict(docs = [
+ dict(
+ resource_id = "123",
+ summary = "Dummy result for query: " + (query or ''),
+ )
+ ])
+ return dummy_result
+
+class BloodhoundIndexSystem(Component):
+ """Implements core indexing functionality, provides methods for
+ adding and deleting documents form index.
+ """
+
+ def rebuild_index(self):
+ """Erase the index if it exists. Then create a new index from scratch.
+ """
+ pass
+
+ def optimize(self):
+ """Optimize underlying index"""
+ pass
+
+ def add_doc(self, doc):
+ """Add a document to underlying search backend.
+
+ The doc must be dictionary with obligatory "type" field
+ """
+ pass
+
+ def delete_doc(self, doc):
+ """Add a document from underlying search backend.
+
+ The doc must be dictionary with obligatory "type" field
+ """
+ pass
+
Added: incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/bhsearch.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/bhsearch.html?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/bhsearch.html (added)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/templates/bhsearch.html Thu Dec 6 12:32:20 2012
@@ -0,0 +1,75 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:i18n="http://genshi.edgewall.org/i18n"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="layout.html" />
+ <head>
+ <title py:choose="">
+ <py:when test="query">Search Results</py:when>
+ <py:otherwise>Search</py:otherwise>
+ </title>
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {$("#q").get(0).focus()});
+ </script>
+ </head>
+ <body>
+ <div id="content" class="search">
+
+ <h1>This is dummy page. Implementation is coming...</h1>
+ <h1><label for="q">Search</label></h1>
+ <form id="bhsearch" action="${href.bhsearch()}" method="get">
+ <p>
+ <input type="text" id="q" name="q" size="40" value="${query}" />
+ <input type="submit" value="${_('Search')}" />
+ </p>
+ </form>
+
+ <py:if test="results"><hr />
+ <h2 py:if="results">
+ Results <span class="numresults">(${results.displayed_items()})</span>
+ </h2>
+ <xi:include py:with="paginator = results" href="page_index.html" />
+ <div>
+ <dl id="results">
+ <py:for each="result in results">
+ <dt><a href="${result.href}" class="searchable">${result.title}</a></dt>
+ <dd class="searchable">${result.excerpt}</dd>
+ <dd>
+ <py:if test="result.author"><span class="author" i18n:msg="author">By ${format_author(result.author)}</span> —</py:if>
+ <span class="date">${result.date}</span>
+ </dd>
+ </py:for>
+ </dl>
+ </div>
+ <xi:include py:with="paginator = results" href="page_index.html" />
+ </py:if>
+
+ <div id="notfound" py:if="query and not (results)">
+ No matches found.
+ </div>
+ </div>
+ </body>
+</html>
+
Added: incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/__init__.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/__init__.py?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/__init__.py (added)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/tests/__init__.py Thu Dec 6 12:32:20 2012
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
Added: incubator/bloodhound/trunk/bloodhound_search/bhsearch/web_ui.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/bhsearch/web_ui.py?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/bhsearch/web_ui.py (added)
+++ incubator/bloodhound/trunk/bloodhound_search/bhsearch/web_ui.py Thu Dec 6 12:32:20 2012
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Bloodhound Search user interface"""
+
+import pkg_resources
+import re
+
+from trac.core import *
+from genshi.builder import tag
+from trac.perm import IPermissionRequestor
+from trac.web import IRequestHandler
+from trac.util.translation import _
+from trac.web.chrome import (INavigationContributor, ITemplateProvider,
+ add_link, add_stylesheet, add_warning,
+ web_context)
+from bhsearch.api import BloodhoundQuerySystem
+
+SEARCH_PERMISSION = 'SEARCH_VIEW'
+
+class BloodhoundSearchModule(Component):
+ """Main search page"""
+
+ implements(INavigationContributor, IPermissionRequestor, IRequestHandler,
+ ITemplateProvider,
+ # IWikiSyntaxProvider #todo: implement later
+ )
+
+ # INavigationContributor methods
+ def get_active_navigation_item(self, req):
+ return 'bhsearch'
+
+ def get_navigation_items(self, req):
+ if SEARCH_PERMISSION in req.perm:
+ yield ('mainnav', 'bhsearch',
+ tag.a(_('Bloodhound Search'), href=self.env.href.bhsearch()))
+
+ # IPermissionRequestor methods
+ def get_permission_actions(self):
+ return [SEARCH_PERMISSION]
+
+ # IRequestHandler methods
+
+ def match_request(self, req):
+ return re.match(r'/bhsearch?', req.path_info) is not None
+
+ def process_request(self, req):
+ req.perm.assert_permission(SEARCH_PERMISSION)
+
+ query = req.args.get('q')
+
+ data = {}
+ if query:
+ data["query"] = query
+
+ #TODO: add implementation here
+ querySystem = BloodhoundQuerySystem(self.env)
+ result = querySystem.query(query)
+
+ add_stylesheet(req, 'common/css/search.css')
+ return 'bhsearch.html', data, None
+
+ # ITemplateProvider methods
+ def get_htdocs_dirs(self):
+# return [('bhsearch', pkg_resources.resource_filename(__name__, 'htdocs'))]
+ return []
+
+ def get_templates_dirs(self):
+ return [pkg_resources.resource_filename(__name__, 'templates')]
+
Added: incubator/bloodhound/trunk/bloodhound_search/setup.cfg
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/setup.cfg?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/setup.cfg (added)
+++ incubator/bloodhound/trunk/bloodhound_search/setup.cfg Thu Dec 6 12:32:20 2012
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[egg_info]
+tag_build =
+tag_date = 0
+tag_svn_revision = 0
+
+[sdist]
+formats = gztar,bztar,ztar,tar,zip
+
Added: incubator/bloodhound/trunk/bloodhound_search/setup.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_search/setup.py?rev=1417813&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_search/setup.py (added)
+++ incubator/bloodhound/trunk/bloodhound_search/setup.py Thu Dec 6 12:32:20 2012
@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+DESC = """Search plugin for Apache(TM) Bloodhound
+
+Add free text search and query functionality to Bloodhound sites.
+"""
+
+versions = [
+ (0, 4, 0),
+ ]
+
+latest = '.'.join(str(x) for x in versions[-1])
+
+status = {
+ 'planning' : "Development Status :: 1 - Planning",
+ 'pre-alpha' : "Development Status :: 2 - Pre-Alpha",
+ 'alpha' : "Development Status :: 3 - Alpha",
+ 'beta' : "Development Status :: 4 - Beta",
+ 'stable' : "Development Status :: 5 - Production/Stable",
+ 'mature' : "Development Status :: 6 - Mature",
+ 'inactive' : "Development Status :: 7 - Inactive"
+ }
+dev_status = status["alpha"]
+
+cats = [
+ dev_status,
+ "Environment :: Plugins",
+ "Environment :: Web Environment",
+ "Framework :: Trac",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Information Technology",
+ "Intended Audience :: Other Audience",
+ "Intended Audience :: System Administrators",
+ "License :: Unknown",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 2.5",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
+ "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
+ "Topic :: Internet :: WWW/HTTP :: WSGI",
+ "Topic :: Software Development :: Bug Tracking",
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Topic :: Software Development :: User Interfaces",
+ ]
+
+# Be compatible with older versions of Python
+from sys import version
+if version < '2.2.3':
+ from distutils.dist import DistributionMetadata
+ DistributionMetadata.classifiers = None
+ DistributionMetadata.download_url = None
+
+# Add the change log to the package description.
+chglog = None
+try:
+ from os.path import dirname, join
+ chglog = open(join(dirname(__file__), "CHANGES"))
+ DESC+= ('\n\n' + chglog.read())
+finally:
+ if chglog:
+ chglog.close()
+
+DIST_NM = 'BloodhoundSearchPlugin'
+PKG_INFO = {'bhsearch' : ('bhsearch', # Package dir
+ # Package data
+ ['../CHANGES', '../TODO', '../COPYRIGHT',
+ '../NOTICE', '../README', '../TESTING_README',
+ 'htdocs/*.*', 'htdocs/css/*.css',
+ 'htdocs/img/*.*', 'htdocs/js/*.js',
+ 'templates/*', 'default-pages/*'],
+ ),
+# 'search.widgets' : ('search/widgets', # Package dir
+# # Package data
+# ['templates/*', 'htdocs/*.css'],
+# ),
+# 'search.layouts' : ('search/layouts', # Package dir
+# # Package data
+# ['templates/*'],
+# ),
+ 'bhsearch.tests' : ('bhsearch/tests', # Package dir
+ # Package data
+ ['data/**'],
+ ),
+ }
+
+ENTRY_POINTS = r"""
+ [trac.plugins]
+ bhsearch.web_ui = bhsearch.web_ui
+ bhsearch.api = bhsearch.api
+ """
+
+setup(
+ name=DIST_NM,
+ version=latest,
+ description=DESC.split('\n', 1)[0],
+ requires = ['trac'],
+ tests_require = ['dutest>=0.2.4', 'TracXMLRPC'],
+ install_requires = [
+ 'setuptools>=0.6b1',
+ 'Trac>=0.11',
+ ],
+ package_dir = dict([p, i[0]] for p, i in PKG_INFO.iteritems()),
+ packages = PKG_INFO.keys(),
+ package_data = dict([p, i[1]] for p, i in PKG_INFO.iteritems()),
+ include_package_data=True,
+ provides = ['%s (%s)' % (p, latest) for p in PKG_INFO.keys()],
+ obsoletes = ['%s (>=%s.0.0, <%s)' % (p, versions[-1][0], latest) \
+ for p in PKG_INFO.keys()],
+ entry_points = ENTRY_POINTS,
+ classifiers = cats,
+ long_description= DESC
+ )
+
Modified: incubator/bloodhound/trunk/installer/bloodhound_setup.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/bloodhound_setup.py?rev=1417813&r1=1417812&r2=1417813&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ incubator/bloodhound/trunk/installer/bloodhound_setup.py Thu Dec 6 12:32:20 2012
@@ -61,6 +61,7 @@ BASE_CONFIG = {'components': {'bhtheme.*
'multiproduct.*': 'enabled',
'permredirect.*': 'enabled',
'themeengine.*': 'enabled',
+ 'bhsearch.*': 'disabled',
'trac.ticket.web_ui.ticketmodule': 'disabled',
'trac.ticket.report.reportmodule': 'disabled',
},
Modified: incubator/bloodhound/trunk/installer/requirements-dev.txt
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/requirements-dev.txt?rev=1417813&r1=1417812&r2=1417813&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/requirements-dev.txt (original)
+++ incubator/bloodhound/trunk/installer/requirements-dev.txt Thu Dec 6 12:32:20 2012
@@ -26,4 +26,5 @@ TracThemeEngine
-e ../bloodhound_dashboard
-e ../bloodhound_theme
TracPermRedirect
+-e ../bloodhound_search