billowy-motherboard-58443
09/24/2020, 5:09 PMpython_distribution.provides.version
... is it true that the ONLY thing which cares about this is when you do setup-py
an actually build an artifact?hundreds-father-404
09/24/2020, 5:11 PMsetup-py
You can also write your own plugins, though, which also use that value.
(Btw, we try to use threads with Slack to keep conversations more organized)hundreds-father-404
09/24/2020, 5:11 PMhappy-kitchen-89482
09/24/2020, 5:15 PMhappy-kitchen-89482
09/24/2020, 5:15 PMhundreds-father-404
09/24/2020, 5:15 PMbillowy-motherboard-58443
09/24/2020, 5:26 PMbillowy-motherboard-58443
09/24/2020, 5:26 PMbillowy-motherboard-58443
09/24/2020, 5:27 PMbillowy-motherboard-58443
09/24/2020, 5:27 PMbillowy-motherboard-58443
09/24/2020, 5:27 PMpants setup-py -- bdist_wheel....
billowy-motherboard-58443
09/24/2020, 5:28 PMsed
the semver into place in BUILDbillowy-motherboard-58443
09/24/2020, 5:28 PMpants setup-py
billowy-motherboard-58443
09/24/2020, 5:28 PMbillowy-motherboard-58443
09/24/2020, 5:29 PMbillowy-motherboard-58443
09/24/2020, 5:29 PMhundreds-father-404
09/24/2020, 5:31 PM./pants setup-py
?
If it’s only for Pants, you can write a plugin that will run those commands to determine the version for you and dynamically give it to Pants. In other words, the version
will never be explicitly added to the BUILD
file.billowy-motherboard-58443
09/24/2020, 5:36 PMbillowy-motherboard-58443
09/24/2020, 5:37 PMsed
that file than write a plugin 🙂billowy-motherboard-58443
09/24/2020, 5:37 PMversion="FIX_ME_AT_BUILD_TIME"
is what would forever be in version control 🙂billowy-motherboard-58443
09/24/2020, 5:38 PMhundreds-father-404
09/24/2020, 5:39 PM./pants setup-py
Just Works without needing a wrapper script.
But otherwise, doing this via sed and a wrapper script is totally acceptable and keeps it simple
Let us know if you do end up being interested in writing a plugin, for this or something else. We’re happy to helpbillowy-motherboard-58443
09/24/2020, 5:45 PMbillowy-motherboard-58443
09/24/2020, 5:46 PMpants --since.... --...=transitive test
without knowing which sub pkgs to do and getting it rightbillowy-motherboard-58443
09/24/2020, 5:47 PM