Commits

Lars Yencken  committed 6a5ee62

Package with setuptools and update the readme.

  • Participants
  • Parent commits cdc61ae

Comments (0)

Files changed (5)

 *.csv
 tags
 build
+dist
+*.egg-info
 =========
 
 :Author: Lars Yencken <lars@yencken.org>
-:Date: 12th Feb 2011
+:Date: 26th Oct 2011
 
 Overview
 --------
 ~~~~~~~~~~~~
 
 SimSearch uses MongoDB as its database backend. If you don't already have it,
-install MongoDB first.
+install MongoDB first. By default, it will create and use a database called
+``simsearch`` in MongoDB.
 
 Next, you need Python (2.6/2.7), pip and virtualenv. Then you can install the
 necessary packages in an environment for simsearch::
 
-    $ pip -E ss-env install -r requirements.txt 
+    $ pip -E ss-env install ./simsearch
 
 Occasionally a dependency will fail to install cleanly (e.g. NLTK). In that
 case, you will need to download a package for it, enter the virtual
     $ source /path/to/simsearch/ss-env/bin/activate
     (ss-env) $ python setup.py install
 
+Building and running
+~~~~~~~~~~~~~~~~~~~~
 
-Building
-~~~~~~~~
+Once installed, build the database with::
 
-Once you have all the packages, you are good to build! Source the environment
-variables needed, and get to work.
-
-Firstly, we build the Cython module using Scons::
-
-    $ scons
-
-Secondly, we set the database building::
-
-    $ source environ_vars.sh
-    (ss-env) $ ./simsearch/manage.py build
+    $ python -m simsearch.models
     Building similarity matrix
     Building neighbourhood graph
 
-Now you're done, and can run it locally::
-
-    $ source environ_vars.sh
-    (ss-env) $ ./simsearch/manage.py runserver
-
-The server will now be available at http://127.0.0.1:8000/.
+You can then run the debug server with the command ``simsearch.py``. The
+server will be available at http://localhost:5000/.
 
 Deploying
 ---------
 
-Please see standard Django deployment docs for installing this on a web server, e.g. using Apache and mod_python.
+Please see Flask documentation around deployment. Feel free to email me as
+well, if you have any issues.
 

File runserver.py

-#!/usr/bin/env python
-
-if __name__ == '__main__':
-    from simsearch import app
-    app.run(debug=True)
-
+# -*- coding: utf-8 -*-
+#
+#  setup.py
+#  simsearch
+#
+#  Created by Lars Yencken on 2011-10-26.
+#  Copyright 2011 Lars Yencken. All rights reserved.
+#
+
+"""
+Package information for simsearch.
+"""
+
+from setuptools import setup
+from setuptools.extension import Extension
+
+setup(
+    name='simsearch',
+    author='Lars Yencken',
+    author_email='lars@yencken.org',
+    version='0.3.0',
+    description='Similarity search for Japanese kanji.',
+    url="http://simsearch.gakusha.info/",
+    license='BSD',
+    install_requires=[
+        'cjktools>=1.5.0',
+        'cjktools-data>=0.2.1-2010-07-29',
+        'consoleLog>=0.2.4',
+        'simplestats>=0.2.0',
+        'pymongo',
+        'mongoengine>=0.3',
+        'pyyaml',
+        'nltk',
+        'mercurial',
+        'flask',
+        'simplejson',
+    ],
+    packages=['simsearch'],
+    ext_modules=[Extension(
+            'simsearch.stroke',
+            sources=['simsearch/stroke.pyx'],
+        )],
+    scripts=['simsearch.py'],
+    zip_safe=False,
+)
+

File simsearch.py

+#!/usr/bin/env python
+
+if __name__ == '__main__':
+    from simsearch import app
+    app.run(debug=True)
+