Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

build okascore.so, change license, ignore derived

  • Loading branch information...
commit 9416a341a04c3f185a022d14eae2e1ad6ab3bee7 1 parent 349600b
Chris McDonough mcdonc authored
16 .gitignore
... ... @@ -1,4 +1,3 @@
1   -env26/
2 1 *.egg
3 2 *.egg-info
4 3 *.pyc
@@ -6,12 +5,13 @@ env26/
6 5 .coverage
7 6 dist/
8 7 *~
9   -.tox
  8 +.tox/
10 9 nosetests.xml
11   -repoze/catalog/coverage.xml
  10 +hypatia/coverage.xml
12 11 distribute-*.gz
13   -env
14   -.build
15   -bin
16   -include
17   -lib
  12 +env*/
  13 +.build/
  14 +bin/
  15 +include/
  16 +lib/
  17 +build/
4 COPYRIGHT.txt
... ... @@ -1,3 +1,5 @@
85 LICENSE.txt
... ... @@ -1,41 +1,44 @@
1   -License
2   -
3   - A copyright notice accompanies this license document that identifies
4   - the copyright holders.
5   -
6   - Redistribution and use in source and binary forms, with or without
7   - modification, are permitted provided that the following conditions are
8   - met:
9   -
10   - 1. Redistributions in source code must retain the accompanying
11   - copyright notice, this list of conditions, and the following
12   - disclaimer.
13   -
14   - 2. Redistributions in binary form must reproduce the accompanying
15   - copyright notice, this list of conditions, and the following
16   - disclaimer in the documentation and/or other materials provided
17   - with the distribution.
18   -
19   - 3. Names of the copyright holders must not be used to endorse or
20   - promote products derived from this software without prior
21   - written permission from the copyright holders.
22   -
23   - 4. If any files are modified, you must cause the modified files to
24   - carry prominent notices stating that you changed the files and
25   - the date of any change.
26   -
27   - Disclaimer
28   -
29   - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND
30   - ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
31   - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
32   - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33   - HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34   - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
35   - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36   - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
37   - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
38   - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
39   - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40   - SUCH DAMAGE.
41   -
  1 +Zope Public License (ZPL) Version 2.1
  2 +
  3 +A copyright notice accompanies this license document that identifies the
  4 +copyright holders.
  5 +
  6 +This license has been certified as open source. It has also been designated as
  7 +GPL compatible by the Free Software Foundation (FSF).
  8 +
  9 +Redistribution and use in source and binary forms, with or without
  10 +modification, are permitted provided that the following conditions are met:
  11 +
  12 +1. Redistributions in source code must retain the accompanying copyright
  13 +notice, this list of conditions, and the following disclaimer.
  14 +
  15 +2. Redistributions in binary form must reproduce the accompanying copyright
  16 +notice, this list of conditions, and the following disclaimer in the
  17 +documentation and/or other materials provided with the distribution.
  18 +
  19 +3. Names of the copyright holders must not be used to endorse or promote
  20 +products derived from this software without prior written permission from the
  21 +copyright holders.
  22 +
  23 +4. The right to distribute this software or to use it for any purpose does not
  24 +give you the right to use Servicemarks (sm) or Trademarks (tm) of the
  25 +copyright
  26 +holders. Use of them is covered by separate agreement with the copyright
  27 +holders.
  28 +
  29 +5. If any files are modified, you must cause the modified files to carry
  30 +prominent notices stating that you changed the files and the date of any
  31 +change.
  32 +
  33 +Disclaimer
  34 +
  35 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
  36 +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  37 +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  38 +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
  39 +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  40 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  41 +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  42 +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  43 +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  44 +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1  hypatia/indexes/text/.gitignore
... ... @@ -0,0 +1 @@
  1 +okascore.so
47 setup.py
@@ -15,8 +15,44 @@
15 15 __version__ = '0.0'
16 16
17 17 import os
  18 +import sys
  19 +
  20 +from setuptools import setup, find_packages, Extension
  21 +from distutils.command.build_ext import build_ext
  22 +from distutils.errors import CCompilerError
  23 +from distutils.errors import DistutilsExecError
  24 +from distutils.errors import DistutilsPlatformError
  25 +
  26 +class optional_build_ext(build_ext):
  27 + """This class subclasses build_ext and allows
  28 + the building of C extensions to fail.
  29 + """
  30 + def run(self):
  31 + try:
  32 + build_ext.run(self)
  33 +
  34 + except DistutilsPlatformError, e:
  35 + self._unavailable(e)
  36 +
  37 + def build_extension(self, ext):
  38 + try:
  39 + build_ext.build_extension(self, ext)
  40 +
  41 + except (CCompilerError, DistutilsExecError), e:
  42 + self._unavailable(e)
  43 +
  44 + def _unavailable(self, e):
  45 + print >> sys.stderr, '*' * 80
  46 + print >> sys.stderr, """WARNING:
  47 +
  48 + An optional code optimization (C extension) could not be compiled.
  49 +
  50 + Optimizations for this package will not be available!"""
  51 + print >> sys.stderr
  52 + print >> sys.stderr, e
  53 + print >> sys.stderr, '*' * 80
  54 +
18 55
19   -from setuptools import setup, find_packages
20 56
21 57 try:
22 58 here = os.path.abspath(os.path.dirname(__file__))
@@ -43,10 +79,10 @@
43 79 "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
44 80 ],
45 81 keywords='indexing catalog search',
46   - author="Chris McDonough, Agendaless Consulting",
  82 + author="Zope Foundation and Contributors",
47 83 author_email="pylons-discuss@googlegroups.com",
48 84 url="http://pylonsproject.org",
49   - license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
  85 + license="ZPL 2.1",
50 86 packages=find_packages(),
51 87 include_package_data=True,
52 88 zip_safe=False,
@@ -57,6 +93,11 @@
57 93 'testing': testing_extras,
58 94 'docs':docs_extras,
59 95 },
  96 + ext_modules=[
  97 + Extension('hypatia.indexes.text.okascore',
  98 + [os.path.join('hypatia', 'indexes', 'text', 'okascore.c')]),
  99 + ],
  100 + cmdclass = {'build_ext':optional_build_ext},
60 101 test_suite="hypatia",
61 102 ## entry_points = """\
62 103 ## [console_scripts]

0 comments on commit 9416a34

Please sign in to comment.
Something went wrong with that request. Please try again.