New implementation of re module
Alex Willmer
alex at moreati.org.uk
Tue Aug 4 20:30:05 EDT 2009
On Jul 27, 5:34 pm, MRAB <pyt... at mrabarnett.plus.com> wrote:
> Hi all,
>
> I've been working on a new implementation of the re module. The details
> are athttp://bugs.python.org/issue2636, specifically fromhttp://bugs.python.org/issue2636#msg90954. I've included a .pyd file for
> Python 2.6 on Windows if you want to try it out.
Firstly Matthew, thank you for all your work on this. It brings some
very nice regex features to Python.
I've used Christopher Arndt's post as a basis and created a package
from you latest upload (issue2636-20090804.zip), which builds for
Python 2.5 and 2.6. I'd like to see this on PyPI, so it's easier to
install the module and your work gets wider exposure. Would this be
alright and would you prefer to have control of the upload, as this is
your work?
Below is the setup.py, the unicodedata_db.h files are taken from the
appropriate branches on svn.python.org
#!/usr/bin/env python
import shutil
import sys
from distutils.core import setup, Extension
MAJOR, MINOR = sys.version_info[:2]
# Copy appropriate unicodedata_db.h, not found in published includes
if (MAJOR, MINOR) == (2, 6):
shutil.copy('Python26/unicodedata_db.h', './')
elif (MAJOR, MINOR) == (2, 5):
shutil.copy('Python25/unicodedata_db.h', './')
else:
print "WARNING: No unicodedata_db.h prepared."
setup(
name='regex',
version='20080804',
description='Alternate regular expression module, to replace re.',
author='Matthew Barnett',
author_email='python at mrabarnett.nospam.plus.com', # Obsfucated
url='http://bugs.python.org/issue2636',
py_modules = ['regex'],
ext_modules=[Extension('_regex', ['_regex.c'])],
)
Sincerely, Alex Willmer
More information about the Python-list
mailing list