/usr/lib/python2.6/site-packages/pbr
NameSizeModeActions
cmd/-0755rm
hooks/-0755rm
tests/-0755rm
builddoc.py90840644editdlrm
builddoc.pyc77030644editdlrm
core.py62410644editdlrm
core.pyc34060644editdlrm
extra_files.py10960644editdlrm
extra_files.pyc7630644editdlrm
find_package.py10430644editdlrm
find_package.pyc7450644editdlrm
git.py99170644editdlrm
git.pyc93090644editdlrm
options.py23710644editdlrm
options.pyc5320644editdlrm
packaging.py229910644editdlrm
packaging.pyc230420644editdlrm
pbr_json.py11880644editdlrm
pbr_json.pyc7520644editdlrm
testr_command.py54460644editdlrm
testr_command.pyc57490644editdlrm
util.py248780644editdlrm
util.pyc176260644editdlrm
version.py185610644editdlrm
version.pyc165280644editdlrm
__init__.py00644editdlrm
__init__.pyc1280644editdlrm
Edit: /usr/lib/python2.6/site-packages/pbr/version.pyc (16528B)
Ñò ;vVc@sodZddkZddkZddkZddkZd„Zdefd„ƒYZdefd„ƒYZdS(s9 Utilities for consuming the version from pkg_resources. iÿÿÿÿNcCs-yt|ƒtSWntj otSXdS(N(tinttTruet ValueErrortFalse(tstring((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt_is_ints  tSemanticVersioncBsàeZdZdddddd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z ed „ƒZd „Zd„Zd„Zeed„Zdd„Zd„Zd„Zd„Zd„ZRS(svA pure semantic version independent of serialisation. See the pbr doc 'semver' for details on the semantics. icCsc||_||_||_||_||_|io|i o d|_n|pd|_dS(s Create a SemanticVersion. :param major: Major component of the version. :param minor: Minor component of the version. Defaults to 0. :param patch: Patch level component. Defaults to 0. :param prerelease_type: What sort of prerelease version this is - one of a(alpha), b(beta) or rc(release candidate). :param prerelease: For prerelease versions, what number prerelease. Defaults to 0. :param dev_count: How many commits since the last release. iN(t_majort_minort_patcht_prerelease_typet _prereleaset _dev_count(tselftmajortminortpatchtprerelease_typet prereleaset dev_count((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__init__*s      cCs%t|tƒptS|i|ijS(N(t isinstanceRRt__dict__(R tother((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__eq__AscCsttt|iiƒƒƒS(N(tsumtmapthashRtvalues(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__hash__FscCs€hdd6dd6dd6dd6}|io|i o d}nd}|i|i|i|||i|i|iptifS(s.Return a key for sorting SemanticVersion's on.tatbtrctziiN( tNoneR R RRR R tsystmaxsize(R t rc_lookuptuq_dev((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt _sort_keyIs " cCs6t|tƒptdƒ‚n|iƒ|iƒjS(s1Compare self and other, another Semantic Version.s,ordering to non-SemanticVersion is undefined(RRt TypeErrorR'(R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__lt__`scCs||jp ||jS(N((R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__le__jscCs ||j S(N((R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__ge__mscCs ||j S(N((R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__gt__pscCs ||j S(N((R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__ne__sscCsd|iƒS(Nspbr.version.SemanticVersion(%s)(trelease_string(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__repr__vscCs~|d iƒptd|ƒ‚n|idƒ}g}|D]}|iƒo ||q?q?~}t|ƒ}|djotd|ƒ‚n¶|djo¨|t|ƒjoy||diƒod||}ditid„|ƒƒ}|i|ƒ||t|ƒg|||d+|d7}n|idgd|ƒn|i||ƒt |dƒ} t |dƒ} d} d} d} d}d„}t |d ƒot |d ƒ}nd}dg|d d +|d}t }y&|ot |dƒo t }nWntj onX|ot |dƒ} nÝ|oN|ddd jp|dddjo$||dƒ\} }|d}nx„|o||d}|idƒot |dƒ} nA|idƒod} t |dƒ} ntd||fƒ‚|d}q”Wt| | |d| d|d| ƒ}| o7| otd|fƒ‚n|iƒi| ƒ}n|S(s²Create a SemanticVersion from a pip version string. This method will parse a version like 1.3.0 into a SemanticVersion. This method is responsible for accepting any version string that any older version of pbr ever created. Therefore: versions like 1.3.0a1 versions are handled, parsed into a canonical form and then output - resulting in 1.3.0.0a1. Pre pbr-semver dev versions like 0.10.1.3.g83bef74 will be parsed but output as 0.10.1.dev3.g83bef74. :raises ValueError: Never tagged versions sdisted by old pbr result in just the git hash, e.g. '1234567' which poses a substantial problem since they collide with the semver versions when all the digits are numerals. Such versions will result in a ValueError being thrown if any non-numeric digits are present. They are an exception to the general case of accepting anything we ever output, since they were never intended and would permanently mess up versions on PyPI if ever released - we're treating that as a critical bug that we ever made them and have stopped doing that. isInvalid version %rt.iitcSs |iƒS((tisdigit(tx((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt scSs}tidƒ}diti||ƒƒ}tidƒ}diti||ƒƒ}|t|ƒdd…}|t|ƒfS(NR2R1tisalpha( toperatort methodcallertjoint itertoolst dropwhilet takewhiletlenR"R(tsegmentR2R5RR((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt _parse_type®s it0RRtrtdevtpostisUnknown remainder %r in %rRRRs0Cannot combine postN and devN - no mapping in %rN(RRR@(R2RtsplitR<R8R9R;tappendtextendRR"RRRt startswithRt incrementtto_dev(tklasstversion_stringtinput_componentst_[1]tct componentst digit_lentmixed_componenttlast_componentRRRt post_countRRR>Rt remaindertremainder_starts_with_intt componenttresult((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pytfrom_pip_stringys€2      !   cCsd|i|i|ifS(s3Return the short version minus any alpha/beta tags.s%s.%s.%s(RRR (R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt brief_stringäscCs |idƒS(s´Return the version number to use when building a debian package. This translates the PEP440/semver precedence rules into Debian version sorting operators. t~(t _long_version(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt debian_stringèscCsŽ|io#|id}|i}|i}nRd}|io|id}|i}n(d}|io|id}nd}t|||ƒS(s‰Return a decremented SemanticVersion. Decrementing versions doesn't make a lot of sense - this method only exists to support rendering of pre-release versions strings into serialisations (such as rpm) with no sort-before operator. The 9999 magic version component is from the spec on this - pbr-semver. :return: A new SemanticVersion object. ii'i(R RRR(R t new_patcht new_minort new_major((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt decrementðs        cCsÈ|io#|i}|id}|i}nd}d}|id}|o#|id}d}d}d}n |i}|o)|id}d}d}d}d}n |i}t|||||ƒS(s~Return an incremented SemanticVersion. The default behaviour is to perform a patch level increment. When incrementing a prerelease version, the patch level is not changed - the prerelease serial is changed (e.g. beta 0 -> beta 1). Incrementing non-pre-release versions will not introduce pre-release versions - except when doing a patch incremental to a pre-release version the new version will only consist of major/minor/patch. :param minor: Increment the minor version. :param major: Increment the major version. :return: A new SemanticVersion object. iiN(R R R R"RRR(R RRtnew_prerelease_typetnew_prereleaseR\R]R^((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRG s.            R1cCsê|ip |io,|djo|iƒiƒg}d}n|iƒg}|io'|id|||i|ifƒn|ioI|ip|i|ƒn|idƒ|idƒ|i|iƒndid„|DƒƒS(s1Construct a long string version of this semver. :param pre_separator: What separator to use between components that sort before rather than after. If None, use . and lower the version number of the component to preserve sorting. (Used for rpm support) R0s%s%s%s%sRAR1cssx|]}t|ƒVqWdS(N(tstr(t.0ts((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pys Ps N(R R R"R_RXRDR R8(R t pre_separatort rc_markertsegments((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRZ7s        cCs|iddƒS(shReturn the full version of the package. This including suffixes indicating VCS status. R0R?(RZ(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyR.RscCs |idƒS(sSReturn the version number to use when building an RPM package. This translates the PEP440/semver precedence rules into RPM version sorting operators. Because RPM has no sort-before operator (such as the ~ operator in dpkg), we show all prerelease versions as being versions of the release before. N(RZR"(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt rpm_stringYscCs+t|i|i|i|i|id|ƒS(s~Return a development version of this semver. :param dev_count: The number of commits since the last release. R(RRRR R R (R R((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRHcscCs |i|i|ig}|io•hddtf6ddtf6ddtf6ddtf6ddtf6d dtf6}|i||it|iƒfƒ|i|ip|i ƒnJ|io%|id ƒ|i|id ƒn|id ƒ|id ƒt |ƒS(s¾Present the version as a version_info tuple. For documentation on version_info tuples see the Python documentation for sys.version_info. Since semver and PEP-440 represent overlapping but not subsets of versions, we have to have some heuristic / mapping rules, and have extended the releaselevel field to have alphadev, betadev and candidatedev values. When they are present the dev count is used to provide the serial. - a/b/rc take precedence. - if there is no pre-release version the dev version is used. - serial is taken from the dev/a/b/c component. - final non-dev versions never get serials. talphaRtbetaRt candidateR talphadevtbetadevt candidatedevRAitfinali( RRR R RRRDtboolR R ttuple(R Rgttype_map((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt version_tuplels"         N(t__name__t __module__t__doc__R"RRRR'R)R*R+R,R-R/t classmethodRWRXR[R_RRGRZR.RhRHRs(((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyR$s,         k   *   t VersionInfocBs_eZd„Zd„Zd„Zd„Zd„Zd„Zd„ZeZ eZ dd„Z RS( cCs(||_d|_d|_d|_dS(s­Object that understands versioning for a package :param package: name of the python package, such as glance, or python-glanceclient N(tpackageR"tversiont_cached_versiont _semantic(R Ry((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyR“s   cCs |iƒS(s1Make the VersionInfo object behave like a string.(RJ(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt__str__žscCsd|i|iƒfS(sInclude the name.spbr.version.VersionInfo(%s:%s)(RyRJ(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyR/¢scCsyy1tii|iƒ}ti|ƒ}|i}Wn8tij o)ddkl}|i |iƒ}nXt i |ƒS(sObtain a version from pkg_resources or setup-time logic if missing. This will try to get the version of the package from the pkg_resources record associated with the package, and if there is no such record falls back to the logic sdist would use. iÿÿÿÿ(t packaging( t pkg_resourcest RequirementtparseRyt get_providerRztDistributionNotFoundtpbrR~t get_versionRRW(R t requirementtprovidert result_stringR~((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyt_get_version_from_pkg_resources§s cCs|iƒiƒS(shReturn the full version of the package. This including suffixes indicating VCS status. (tsemantic_versionR.(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyR.ºscCs*|idjo|iƒ|_n|iS(s3Return the SemanticVersion object for this version.N(R|R"R‰(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRŠÁscCs|iƒiƒS(s3Return the short version minus any alpha/beta tags.(RŠRX(R ((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRJÇsR1cCs.|ipd||iƒf|_n|iS(síReturn a cached version string. This will return a cached version string if one is already cached, irrespective of prefix. If none is cached, one will be created with prefix and then cached and returned. s%s%s(R{RJ(R tprefix((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pytcached_version_stringÏs ( RtRuRR}R/R‰R.RŠRJtcanonical_version_stringtversion_string_with_vcsRŒ(((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyRx‘s      ( RvR9R6R#RRtobjectRRx(((s(/tmp/pip-build-cD3xZi/pbr/pbr/version.pyts     ÿn