~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lazy_regex.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Lazily compiled regex objects.
18
18
 
91
91
 
92
92
def reset_compile():
93
93
    """Restore the original function to re.compile().
94
 
    
 
94
 
95
95
    It is safe to call reset_compile() multiple times, it will always
96
96
    restore re.compile() to the value that existed at import time.
97
97
    Though the first call will reset back to the original (it doesn't
101
101
 
102
102
 
103
103
_real_re_compile = re.compile
104
 
assert _real_re_compile is not lazy_compile, \
105
 
    "re.compile has already been overridden as lazy_compile, but this would" \
106
 
    " cause infinite recursion"
 
104
if _real_re_compile is lazy_compile:
 
105
    raise AssertionError(
 
106
        "re.compile has already been overridden as lazy_compile, but this would" \
 
107
        " cause infinite recursion")