Dan Colish avatar Dan Colish committed 5777f50

add setup script and helper for installing xapian environment

Comments (0)

Files changed (3)

 indexers maybe don't use multiple cores / processes). But OTOH, if it
 is that easy, why not use it? :)
 
+To make the Xapian install as simple as possible its recommended that you put
+the xapian-core and xapian-bindings into the same virtualenv which hosts these
+benchmarks. To help we've included a shell script which will attempt to set
+these up for you.
+from setuptools import find_packages, setup
+
+# description = ''
+# with open('README.rst') as f:
+#     description = f.read()
+
+setup(name="python-search-benchmark",
+      version='dev',
+      description='',
+      long_description='',
+      packages=find_packages(),
+      license='MIT',
+      platforms='any',
+      install_requires=[
+        "xappy",
+        "whoosh",
+        "xodb",
+        ],
+      )
+venv_path="ENV"
+build_lib () {
+    if [ ! -e  "$1" ] ; then
+        # FIXME: the 1.2.8 should not be hard-coded
+        version=$(echo "$1" | cut -f 3 -d '-')
+        wget http://oligarchy.co.uk/xapian/$version/$1.tar.gz
+        tar -C . -xzf $1.tar.gz
+    fi
+    pushd $1
+    ./configure --prefix=`pwd`/../$venv_path/ --with-python
+    make -j5
+    make install
+    popd
+}
+
+virtualenv --no-site-package $venv_path
+. $venv_path/bin/activate
+build_lib "xapian-core-1.2.8"
+build_lib "xapian-bindings-1.2.8"
+python setup.py develop
+python bench.py
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.