ó
}k^c           @   sg   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d „  Z d „  Z d e j f d „  ƒ  YZ d S(   iÿÿÿÿN(   t   copy(   t   parse_vrangec         C   s9   y t  | ƒ SWn$ t k
 r4 t j d | ƒ ‚ n Xd  S(   Ns   version range is invalid: %s(   R   t
   ValueErrort   optparset   OptionValueError(   t   optiont   optt   value(    (    s%   /usr/share/python/debpython/option.pyt   parse_version_range   s    c         C   s:   y t  j | ƒ } Wn  t k
 r5 t j d ƒ ‚ n X| S(   Ns   regular expression is not valid(   t   ret   compilet	   ExceptionR   R   (   R   R   R   t   pattern(    (    s%   /usr/share/python/debpython/option.pyt   compile_regexpr#   s
    t   Optionc           B   s>   e  Z e j j d Z e e j j ƒ Z e e d  <e e d <RS(   t   version_ranget   regexpr(   R   R   (	   t   __name__t
   __module__R   R   t   TYPESR    t   TYPE_CHECKERR   R   (    (    (    s%   /usr/share/python/debpython/option.pyR   +   s   
(   R	   R   R    t   debpython.versionR   R   R   R   (    (    (    s%   /usr/share/python/debpython/option.pyt   <module>   s   		