Python pip._vendor.packaging.version._BaseVersion() Examples
The following are 7
code examples of pip._vendor.packaging.version._BaseVersion().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pip._vendor.packaging.version
, or try the search function
.
Example #1
Source File: candidates.py From rules_pip with MIT License | 6 votes |
def __init__( self, link, # type: Link parent, # type: InstallRequirement factory, # type: Factory name=None, # type: Optional[str] version=None, # type: Optional[_BaseVersion] ): # type: (...) -> None super(LinkCandidate, self).__init__( link=link, ireq=make_install_req_from_link(link, parent), factory=factory, name=name, version=version, )
Example #2
Source File: candidates.py From rules_pip with MIT License | 6 votes |
def __init__( self, link, # type: Link parent, # type: InstallRequirement factory, # type: Factory name=None, # type: Optional[str] version=None, # type: Optional[_BaseVersion] ): # type: (...) -> None super(EditableCandidate, self).__init__( link=link, ireq=make_install_req_from_editable(link, parent), factory=factory, name=name, version=version, )
Example #3
Source File: candidates.py From rules_pip with MIT License | 5 votes |
def __init__( self, link, # type: Link ireq, # type: InstallRequirement factory, # type: Factory name=None, # type: Optional[str] version=None, # type: Optional[_BaseVersion] ): # type: (...) -> None self.link = link self._factory = factory self._ireq = ireq self._name = name self._version = version self._dist = None # type: Optional[Distribution]
Example #4
Source File: candidates.py From rules_pip with MIT License | 5 votes |
def version(self): # type: () -> _BaseVersion if self._version is None: self._version = self.dist.parsed_version return self._version
Example #5
Source File: candidates.py From rules_pip with MIT License | 5 votes |
def version(self): # type: () -> _BaseVersion return self.dist.parsed_version
Example #6
Source File: candidates.py From rules_pip with MIT License | 5 votes |
def version(self): # type: () -> _BaseVersion return self._version
Example #7
Source File: factory.py From rules_pip with MIT License | 5 votes |
def _make_candidate_from_link( self, link, # type: Link extras, # type: Set[str] parent, # type: InstallRequirement name=None, # type: Optional[str] version=None, # type: Optional[_BaseVersion] ): # type: (...) -> Candidate # TODO: Check already installed candidate, and use it if the link and # editable flag match. if parent.editable: if link not in self._editable_candidate_cache: self._editable_candidate_cache[link] = EditableCandidate( link, parent, factory=self, name=name, version=version, ) base = self._editable_candidate_cache[link] # type: BaseCandidate else: if link not in self._link_candidate_cache: self._link_candidate_cache[link] = LinkCandidate( link, parent, factory=self, name=name, version=version, ) base = self._link_candidate_cache[link] if extras: return ExtrasCandidate(base, extras) return base