Commit 73ed53c9 authored by Mark Florisson's avatar Mark Florisson

Move buffer utilities, fix manifest and package data for utilities

parent 2599deb2
This diff is collapsed.
...@@ -61,10 +61,10 @@ class UtilityCodeBase(object): ...@@ -61,10 +61,10 @@ class UtilityCodeBase(object):
if utility: if utility:
if cls.is_cython_utility: if cls.is_cython_utility:
# Don't forget our line number # Don't forget our line number
code = '\n' * begin_lineno + ''.join(lines) code = '' * begin_lineno + ''.join(lines)
else: else:
# line numbers are not important here # line numbers are not important here
code = '\n'.join(lines) code = ''.join(lines)
if type == 'Proto': if type == 'Proto':
utility[0] = code utility[0] = code
...@@ -87,7 +87,7 @@ class UtilityCodeBase(object): ...@@ -87,7 +87,7 @@ class UtilityCodeBase(object):
else: else:
comment = '/' comment = '/'
regex = r'%s{5,20}\s*((\w|\.)+)\s*%s{5,20}' % (comment, comment) regex = r'%s{5,30}\s*((\w|\.)+)\s*%s{5,30}' % (comment, comment)
utilities = {} utilities = {}
lines = [] lines = []
...@@ -141,11 +141,12 @@ class UtilityCodeBase(object): ...@@ -141,11 +141,12 @@ class UtilityCodeBase(object):
Utilities in the file can be specified as follows: Utilities in the file can be specified as follows:
# UtilityProto: name ##### MyUtility.proto #####
# UtilityImpl: name ##### MyUtility #####
for prototypes and implementation respectively. For non-python or for prototypes and implementation respectively. For non-python or
-cython files a // comment should be used instead. -cython files /-es should be used instead. 5 to 30 pound signs may be
used on either side.
If context is given, the utility is considered a tempita template. If context is given, the utility is considered a tempita template.
The context dict (which may be empty) will be unpacked to form The context dict (which may be empty) will be unpacked to form
......
This diff is collapsed.
...@@ -18,7 +18,7 @@ include Demos/freeze/* ...@@ -18,7 +18,7 @@ include Demos/freeze/*
include Demos/libraries/* include Demos/libraries/*
include Demos/Makefile* include Demos/Makefile*
recursive-include Cython/Debugger/Tests *.pyx *.pxd *.c *.h recursive-include Cython/Debugger/Tests *.pyx *.pxd *.c *.h
recursive-include Cython/Utility *.pyx *.pxd *.c *.h recursive-include Cython/Utility *.pyx *.pxd *.c *.h .cpp
recursive-include Tools * recursive-include Tools *
recursive-include tests *.pyx *.pxd *.pxi *.py *.h *.BROKEN bugs.txt recursive-include tests *.pyx *.pxd *.pxi *.py *.h *.BROKEN bugs.txt
recursive-include tests *_lib.cpp *.srctree recursive-include tests *_lib.cpp *.srctree
......
...@@ -63,7 +63,7 @@ else: ...@@ -63,7 +63,7 @@ else:
'Cython.Plex' : ['*.pxd'], 'Cython.Plex' : ['*.pxd'],
'Cython.Compiler' : ['*.pxd'], 'Cython.Compiler' : ['*.pxd'],
'Cython.Runtime' : ['*.pyx', '*.pxd'], 'Cython.Runtime' : ['*.pyx', '*.pxd'],
'Cython.Utility' : ['*.pyx', '*.pxd', '*.c', '*.h'], 'Cython.Utility' : ['*.pyx', '*.pxd', '*.c', '*.h', '.cpp'],
'Cython' : [ p[7:] for p in pxd_include_patterns ], 'Cython' : [ p[7:] for p in pxd_include_patterns ],
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment