witty-crayon-22786
06/23/2018, 4:45 AMenough-analyst-54434
06/24/2018, 3:10 AMenough-analyst-54434
06/25/2018, 6:04 PMwitty-crayon-22786
06/25/2018, 8:30 PMrough-minister-58256
06/25/2018, 8:37 PMenough-analyst-54434
06/25/2018, 9:14 PMenough-analyst-54434
06/26/2018, 2:26 AMrough-minister-58256
06/26/2018, 2:52 AMenough-analyst-54434
06/26/2018, 5:42 PMegg_info --tag-build <suffix>
is a standard setuptools command that can be prefixed to sdist, bdist_wheel, etc to change the distribution version at build time. Given that bit of technology and this code in pants:
try:
# We're running from a `pantsbuild.pants` distribution which may have a custom version applied at
# build time.
VERSION = pkg_resources.get_distribution('pantsbuild.pants').version
except pkg_resources.DistributionNotFound:
# We're running from bare sources.
VERSION = pkgutil.get_data(__name__, 'VERSION').strip()
... does anyone gack? does anyone cheer?rough-minister-58256
06/26/2018, 5:47 PMenough-analyst-54434
06/26/2018, 5:48 PMhappy-kitchen-89482
06/26/2018, 6:51 PMwitty-crayon-22786
06/26/2018, 9:05 PMenough-analyst-54434
06/26/2018, 10:53 PMit's using the same input fileIt's == setuptools and file == setup.py? or more particularly this line?:
pkg_resources.get_distribution('pantsbuild.pants').version
... not sure what your pronouns refer to @witty-crayon-22786witty-crayon-22786
06/26/2018, 10:57 PMsrc/python/pants/VERSION
is the versionwitty-crayon-22786
06/26/2018, 10:57 PMenough-analyst-54434
06/26/2018, 11:08 PMrough-minister-58256
06/26/2018, 11:08 PMpkg_resources.Distribution
API: [omerta source (master)]$ PEX_INTERPRETER=1 ./pants
Python 2.7.14 (default, Nov 16 2017, 13:57:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import pkg_resources
>>> pants_dist = pkg_resources.get_distribution('pantsbuild.pants')
>>> pants_dist
pantsbuild.pants 1.8.0rc0+26394df2 (/Users/kwilson/dev/source/.pex/install/pantsbuild.pants-1.8.0rc0+26394df2-cp27-none-macosx_10_11_x86_64.whl.8e3a3639d08ef0818f4f5cb4ae4c20e5709cf325/pantsbuild.pants-1.8.0rc0+26394df2-cp27-none-macosx_10_11_x86_64.whl)
>>> type(pants_dist)
<class 'pkg_resources.DistInfoDistribution'>
>>> pants_dist.version
'1.8.0rc0+26394df2'
enough-analyst-54434
06/26/2018, 11:08 PMenough-analyst-54434
06/26/2018, 11:09 PMrough-minister-58256
06/26/2018, 11:09 PMDistribution
as in sdist, bdistenough-analyst-54434
06/26/2018, 11:09 PMenough-analyst-54434
06/26/2018, 11:09 PMenough-analyst-54434
06/26/2018, 11:11 PMwitty-crayon-22786
06/26/2018, 11:11 PMenough-analyst-54434
06/26/2018, 11:12 PMenough-analyst-54434
06/26/2018, 11:12 PMenough-analyst-54434
06/26/2018, 11:12 PMenough-analyst-54434
06/26/2018, 11:12 PMenough-analyst-54434
06/26/2018, 11:12 PM