Changeset 148

Show
Ignore:
Timestamp:
04/26/08 14:05:08 (7 months ago)
Author:
rgrp
Message:

[shakespeare][xl]: install Pylons 0.9.6.1 with all associated files over the top of the existing file structure. As yet have not done much integration (that will follow).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/README.txt

    Revision 115 Revision 148
    1Introduction 1Introduction 
    2************ 2************ 
    3 3 
    4The Open Shakespeare package provides a full open set of shakespeare's works 4The Open Shakespeare package provides a full open set of shakespeare's works 
    5(often in multiple versions) along with ancillary material, a variety of tools 5(often in multiple versions) along with ancillary material, a variety of tools 
    6and a python API. 6and a python API. 
    7 7 
    8Specifically in addition to the works themselves (often in multiple versions) 8Specifically in addition to the works themselves (often in multiple versions) 
    9there is an introduction, a chronology, explanatory notes, a concordance and 9there is an introduction, a chronology, explanatory notes, a concordance and 
    10search facilities. 10search facilities. 
    11 11 
    12All material is open source/open knowledge so that anyone can use, redistribute 12All material is open source/open knowledge so that anyone can use, redistribute 
    13and reuse these materials freely. For exact details of the license under which 13and reuse these materials freely. For exact details of the license under which 
    14this package is made available please see COPYING.txt. 14this package is made available please see COPYING.txt. 
    15 15 
    16Open Shakespeare has been developed under the aegis of the Open Knowledge 16Open Shakespeare has been developed under the aegis of the Open Knowledge 
    17Foundation (http://www.okfn.org/). 17Foundation (http://www.okfn.org/). 
    18 18 
    19Contact the Project 19Contact the Project 
    20******************* 20******************* 
    21 21 
    22Please mail info@okfn.org or join the okfn-discuss mailing list: 22Please mail info@okfn.org or join the okfn-discuss mailing list: 
    23 23 
    24  http://lists.okfn.org/listinfo/okfn-discuss 24  http://lists.okfn.org/listinfo/okfn-discuss 
    25 25 
    26 26 
    27Installation 27Installation and Setup 
    28************ 28********************** 
    29 29 
    301. Install the code 301. Install the code 
    31=================== 31=================== 
    32 32 
    331.1: (EITHER) Install using setup.py (preferred) 331.1: (EITHER) Install using setup.py (preferred) 
    34------------------------------------------------ 34------------------------------------------------ 
    35 35 
    361. Install setuptools36Install ``shakespeare`` using easy_install:
    37 37 
    38   <http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions> 38    easy_install shakespeare 
    39 39 
    40   (Just download http://peak.telecommunity.com/dist/ez_setup.py and run it). 40NB: If you don't have easy_install you can get from here: 
    41 41 
    422. Then do: 42<http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions> 
    43 43 
    44   $ python setup.py install  44 Make a config file as follows:: 
       45  
       46     paster make-config shakespeare config.ini 
       47  
       48 Tweak the config file as appropriate and then setup the application:: 
       49  
       50     paster setup-app config.ini 
    45 51 
    461.2 (OR) Get the code straight from subversion 521.2 (OR) Get the code straight from subversion 
    47------------------------------------------------ 53------------------------------------------------ 
    48 54 
    491. Check out the subversion trunk  55 1. Check out the subversion trunk:: 
    502. Add the path/to/src to your PYTHONPATH  56  
    513. Make sure you have all required dependencies (see install_requires in  57     svn co https://knowledgeforge.net/shakespeare/svn/trunk 
    52   setup.py)  58  
       59 2. Do:: 
       60  
       61     sudo python setup.py develop 
       62  
    53 63 
    542. Cache Directory 642. Cache Directory 
    55================== 65================== 
    56 66 
    57Create a cache directory where texts and other material can be stored 67Create a cache directory where texts and other material can be stored 
    58 68 
    59This directory needs to be semi-permanent so do *not* put under a location such 69This directory needs to be semi-permanent so do *not* put under a location such 
    60as /tmp.  70as /tmp.  
    61 71 
    624. Create a configuration file  72  
       73 3. Create a configuration file 
    63============================== 74============================== 
    64 75 
    651. copy the template at etc/shakespeare.conf.new to a suitable new location 761. copy the template at etc/shakespeare.conf.new to a suitable new location 
    66   (suggestion: etc/shakespeare.conf) 77   (suggestion: etc/shakespeare.conf) 
    67 78 
    682. edit to reflect your setup (see comments in file) 792. edit to reflect your setup (see comments in file) 
    69 80 
    703. make sure the config file can be found: 813. make sure the config file can be found: 
    71  1. EITHER: it must be located at etc/shakespeare.conf relative to the 82  1. EITHER: it must be located at etc/shakespeare.conf relative to the 
    72       directory from which you run scripts 83       directory from which you run scripts 
    73   84   
    74  2. OR: set the SHAKESPEARECONF environment variable to contain the path to 85  2. OR: set the SHAKESPEARECONF environment variable to contain the path to 
    75       the configuration file 86       the configuration file 
    76 87 
    774. Initialize the system  88  
       89 5. Initialize the system 
    78======================== 90======================== 
    79 91 
    80Run: $ bin/shakespeare-admin init 92Run: $ bin/shakespeare-admin init 
    81 93 
    82This may take some time to run so be patient 94This may take some time to run so be patient 
    83 95 
    84TIP: using sqlite building the concordance really **does** seem to run forever 96TIP: using sqlite building the concordance really **does** seem to run forever 
    85so recommend using postgresql or mysql if you are going to build the 97so recommend using postgresql or mysql if you are going to build the 
    86concordance.  98concordance.  
    87 99 
    88 100 
    89Getting Started 101Getting Started 
    90*************** 102*************** 
    91 103 
    92As a user: 104As a user: 
    93========== 105========== 
    94 106 
    95Start up the web interface by running the webserver: 107Start up the web interface by running the webserver: 
    96 108 
    97  $ bin/shakespeare-admin runserver 109  $ bin/shakespeare-admin runserver 
    98 110 
    99Then visit http://localhost:8080/ using your favourite web browser. 111Then visit http://localhost:8080/ using your favourite web browser. 
    100 112 
    101As a developer: 113As a developer: 
    102=============== 114=============== 
    103 115 
    1041. Check out the administrative commands: $ bin/shakespeare-admin help. 1161. Check out the administrative commands: $ bin/shakespeare-admin help. 
    105 117 
    1062. Run the tests: $ py.test 1182. Run the tests: $ py.test 
    107    119    
    108Note that: 120Note that: 
    109    121    
    110  * The tests use [py.test] so you will need to have installed this 122  * The tests use [py.test] so you will need to have installed this 
    111 123 
    112  * To run the website tests (site_test etc) you will need to install [twill] 124  * To run the website tests (site_test etc) you will need to install [twill] 
    113    and have the webserver running 125    and have the webserver running 
    114 126 
    115[py.test]: http://codespeak.net/py/current/doc/getting-started.html 127[py.test]: http://codespeak.net/py/current/doc/getting-started.html 
    116[twill]: http://twill.idyll.org/ 128[twill]: http://twill.idyll.org/ 
    117 129 
  • trunk/setup.py

    Revision 146 Revision 148
    1from setuptools import setup, find_packages  1 try: 
       2     from setuptools import setup, find_packages 
       3 except ImportError: 
       4     from ez_setup import use_setuptools 
       5     use_setuptools() 
       6     from setuptools import setup, find_packages 
    2 7 
    3import sys 8import sys 
    4sys.path.insert(0, './src') 9sys.path.insert(0, '.') 
    5from shakespeare import __version__, __application_name__ 10from shakespeare import __version__, __application_name__ 
    6 11 
    7setup( 12setup( 
    8    name = __application_name__, 13    name = __application_name__, 
    9    version = __version__, 14    version = __version__, 
    10    packages = find_packages(), 15    packages=find_packages(exclude=['ez_setup']), 
    11    scripts = ['bin/shakespeare-admin'], 16    scripts = ['bin/shakespeare-admin'], 
    12    include_package_data = True, 17    include_package_data=True, 
    13 18 
    14    install_requires = ['SQLObject>=0.6',  19     install_requires=[ 
    15        'Paste>=0.1', 'Genshi>=0.3', 'annotater>=0.1',  20         'Pylons>=0.9.6.1', 
       21         'SQLObject>=0.6', 
       22         'Genshi>=0.3', 
       23         'annotater>=0.1', 
    16        ], 24        ], 
      25    test_suite='nose.collector', 
      26    package_data={'shakespeare': ['i18n/*/LC_MESSAGES/*.mo']}, 
      27    #message_extractors = {'shakespeare': [ 
      28    #        ('**.py', 'python', None), 
      29    #        ('public/**', 'ignore', None)]}, 
      30    entry_points=''' 
      31    [paste.app_factory] 
      32    main = shakespeare.config.middleware:make_app 
      33 
      34    [paste.app_install] 
      35    main = pylons.util:PylonsInstaller 
      36    ''', 
    17 37 
    18    # metadata for upload to PyPI 38    # metadata for upload to PyPI 
    19    author = "Rufus Pollock (Open Knowledge Foundation)", 39    author = "Rufus Pollock (Open Knowledge Foundation)", 
    20    author_email = "rufus.pollock@okfn.org", 40    author_email = "rufus.pollock@okfn.org", 
    21    description = \ 41    description = \ 
    22"A full open set of Shakespeare's works along with anciallary material, a variety of tools and a python api", 42"A full open set of Shakespeare's works along with anciallary material, a variety of tools and a python api", 
    23    long_description = \ 43    long_description = \ 
    24""" 44""" 
    25The Open Shakespeare package provides a full open set of shakespeare's works 45The Open Shakespeare package provides a full open set of shakespeare's works 
    26(often in multiple versions) along with ancillary material, a variety of tools 46(often in multiple versions) along with ancillary material, a variety of tools 
    27and a python API. 47and a python API. 
    28 48 
    29Specifically in addition to the works themselves (often in multiple versions) 49Specifically in addition to the works themselves (often in multiple versions) 
    30there is an introduction, a chronology, explanatory notes, a concordance and 50there is an introduction, a chronology, explanatory notes, a concordance and 
    31search facilities. 51search facilities. 
    32 52 
    33All material is open source/open knowledge so that anyone can use, redistribute 53All material is open source/open knowledge so that anyone can use, redistribute 
    34and reuse these materials freely. For exact details of the license under which 54and reuse these materials freely. For exact details of the license under which 
    35this package is made available please see COPYING.txt. 55this package is made available please see COPYING.txt. 
    36 56 
    37Open Shakespeare has been developed under the aegis of the Open Knowledge 57Open Shakespeare has been developed under the aegis of the Open Knowledge 
    38Foundation (http://www.okfn.org/). 58Foundation (http://www.okfn.org/). 
    39""", 59""", 
    40    license = "MIT", 60    license = "MIT", 
    41    keywords = "open shakespeare search view", 61    keywords = "open shakespeare search view", 
    42    url = "http://www.openshakespeare.org/",  62    url = "http://www.openshakespeare.org/",  
    43    download_url = "http://www.openshakespeare.org/code/", 63    download_url = "http://www.openshakespeare.org/code/", 
    44    classifiers = [ 64    classifiers = [ 
    45        'Development Status :: 4 - Beta', 65        'Development Status :: 4 - Beta', 
    46        'Environment :: Console', 66        'Environment :: Console', 
    47        'Environment :: Web Environment', 67        'Environment :: Web Environment', 
    48        'Intended Audience :: Developers', 68        'Intended Audience :: Developers', 
    49        'License :: OSI Approved :: MIT License', 69        'License :: OSI Approved :: MIT License', 
    50        'Operating System :: OS Independent', 70        'Operating System :: OS Independent', 
    51        'Programming Language :: Python', 71        'Programming Language :: Python', 
    52        'Topic :: Software Development :: Libraries :: Python Modules'], 72        'Topic :: Software Development :: Libraries :: Python Modules'], 
    53) 73) 
  • trunk/shakespeare/__init__.py

    Revision 129 Revision 148
    1__version__ = '0.5dev' 1__version__ = '0.5dev' 
    2__application_name__ = 'shakespeare' 2__application_name__ = 'shakespeare' 
    3 3 
    4def conf(): 4def conf(): 
    5    import os 5    import os 
    6    defaultPath = os.path.abspath('./etc/%s.conf' % __application_name__) 6    defaultPath = os.path.abspath('./etc/%s.conf' % __application_name__) 
    7    envVarName = __application_name__.upper() + 'CONF' 7    envVarName = __application_name__.upper() + 'CONF' 
    8    confPath = os.environ.get(envVarName, defaultPath) 8    confPath = os.environ.get(envVarName, defaultPath) 
    9    if not os.path.exists(confPath): 9    if not os.path.exists(confPath): 
    10        raise ValueError('No Configuration file exists at: %s' % confPath) 10        raise ValueError('No Configuration file exists at: %s' % confPath) 
    11    import ConfigParser 11    import ConfigParser 
    12    conf = ConfigParser.SafeConfigParser() 12    conf = ConfigParser.SafeConfigParser() 
    13    conf.read(confPath) 13    conf.read(confPath) 
    14    return conf 14    return conf 
    15 15 
      16