environment/lib/python2.7/site-packages/distribute-0.6.31-py2.7.egg/pkg_resources.py
def parse(cls, src, dist=None):
        """Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
        """
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)
def parse(cls, src, dist=None):
        try:
            attrs = extras = ()
            name,value = src.split('=',1)
            if '[' in value:
                value,extras = value.split('[',1)
                req = Requirement.parse("x["+extras)
                if req.specs: raise ValueError
                extras = req.extras
            if ':' in value:
                value,attrs = value.split(':',1)
                if not MODULE(attrs.rstrip()):
                    raise ValueError
                attrs = attrs.rstrip().split('.')
        except ValueError:
            raise ValueError(
                "EntryPoint must be in 'name=module:attrs [extras]' format",
                src
            )
        else:
            return cls(name.strip(), value.strip(), attrs, extras, dist)
def parse ( cls , src , dist = None ) : try : attrs = extras = ( ) name , value = src . split ( '=' , 1 ) if '[' in value : value , extras = value . split ( '[' , 1 ) req = Requirement . parse ( "x[" + extras ) if req . specs : raise ValueError extras = req . extras if ':' in value : value , attrs = value . split ( ':' , 1 ) if not MODULE ( attrs . rstrip ( ) ) : raise ValueError attrs = attrs . rstrip ( ) . split ( '.' ) except ValueError : raise ValueError ( "EntryPoint must be in 'name=module:attrs [extras]' format" , src ) else : return cls ( name . strip ( ) , value . strip ( ) , attrs , extras , dist )
Parse a single entry point from string `src`

        Entry point syntax follows the form::

            name = some.module:some.attr [extra1,extra2]

        The entry name and module name are required, but the ``:attrs`` and
        ``[extras]`` parts are optional
Parse a single entry point from string src