Alex Willmer <a...@moreati.org.uk> added the comment:

On 13 April 2010 18:10, Matthew Barnett <rep...@bugs.python.org> wrote:
> Anyway, do:
>
>    regex.match(ur"\p{Ll}", u"a")
>    regex.match(ur'(?u)\w', u'\xe0')
>
> really return None? Your results suggest that they won't.

Python 2.6.5 (r265:79063, Apr  3 2010, 01:56:30)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import regex
>>> regex.__version__
'2.3.0'
>>> print regex.match(ur"\p{Ll}", u"a")
None
>>> print regex.match(ur'(?u)\w', u'\xe0')
None

I thought I might be a 64 bit issue, but I see the same result in a 32
bit VM. That leaves my build process. Attached is the setup.py and
build output, unicodedata_db.h was taken from the Ubuntu source deb
for Python 2.6.5.

----------
Added file: http://bugs.python.org/file16913/setup.py
Added file: http://bugs.python.org/file16914/build.log

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________
#!/usr/bin/env python

import os
import shutil
import sys

from distutils.core import setup, Extension

MAJOR, MINOR = sys.version_info[:2]
BASE_DIR = os.path.dirname(os.path.abspath(__file__))

if MAJOR == 2:
    SRC_DIR = BASE_DIR
elif MAJOR == 3:
    SRC_DIR = os.path.join(BASE_DIR, 'Python3')

if (MAJOR, MINOR) in ((2,5), (2,6), (2,7)):
    unicodedata_db_h = os.path.join(SRC_DIR, 'Python%i%i' % (MAJOR, MINOR), 
                                    'unicodedata_db.h')
    shutil.copy(unicodedata_db_h, SRC_DIR)
else:
    sys.exit("No unicodedata_db.h could be prepared.")

setup(
    name='regex',
    version='0.1.2010413',
    description='Alternate regular expression module, to replace re.',
    long_description=open(os.path.join(SRC_DIR, 'Features.rst')).read(),
    
    # PyPI does spam protection on email addresses, no need to do it here
    author='Matthew Barnett',
    author_email='re...@mrabarnett.plus.com',

    # PyPI appears to overwrite author field with maintainer field
    # avoid apparent plagarism for now.
    #maintainer='Alex Willmer',
    #maintainer_email='a...@moreati.org.uk',

    url='http://bugs.python.org/issue2636',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Python Software Foundation License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Scientific/Engineering :: Information Analysis',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Text Processing',
        'Topic :: Text Processing :: General',
        ],
    license='Python Software Foundation License',

    py_modules = ['regex'],
    ext_modules=[Extension('_regex', ['_regex.c'])],
    )
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
copying regex.py -> build/lib.linux-x86_64-2.6
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c _regex.c -o build/temp.linux-x86_64-2.6/_regex.o
In file included from _regex.c:3948:
_regex.c: In function ‘build_lookaround’:
_regex.c:7578: warning: suggest parentheses around ‘&&’ within ‘||’
_regex.c: At top level:
unicodedata_db.h:241: warning: ‘nfc_first’ defined but not used
unicodedata_db.h:448: warning: ‘nfc_last’ defined but not used
unicodedata_db.h:550: warning: ‘decomp_prefix’ defined but not used
unicodedata_db.h:2136: warning: ‘decomp_data’ defined but not used
unicodedata_db.h:3148: warning: ‘decomp_index1’ defined but not used
unicodedata_db.h:3333: warning: ‘decomp_index2’ defined but not used
unicodedata_db.h:4122: warning: ‘comp_index’ defined but not used
unicodedata_db.h:4241: warning: ‘comp_data’ defined but not used
unicodedata_db.h:5489: warning: ‘get_change_3_2_0’ defined but not used
unicodedata_db.h:5500: warning: ‘normalization_3_2_0’ defined but not used
In file included from _regex.c:3948:
_regex.c: In function ‘splitter_split’:
_regex.c:5265: warning: ‘result’ may be used uninitialized in this function
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/_regex.o -o build/lib.linux-x86_64-2.6/_regex.so
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to