Users/axsuarez/setuptools git versioning#72
Merged
Conversation
…nto env variables
…into users/axsuarez/setuptools-git-versioning
MattB-msft
previously approved these changes
Jul 24, 2025
…into users/axsuarez/setuptools-git-versioning
MattB-msft
approved these changes
Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces dynamic versioning for multiple libraries and updates the build configuration to support it. Key changes include adding support for dynamically setting package versions using environment variables, modifying
pyproject.tomlfiles to declare dynamic versioning, and updatingsetup.pyfiles to retrieve and apply the dynamically set version. Additionally, dependencies that were previously hardcoded inpyproject.tomlfiles have been moved tosetup.pyfiles.Dynamic versioning and build configuration updates:
.azdo/ci-pr.yamland.github/workflows/python-package.yml: Added steps to dynamically set the package version using thereplace-version.ps1script and environment variables. ([[1]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-50b28cd1647a6801f28c6abec92ffc548ebdd47848c528f5b9baf0791c47fd7cR37-R41),[[2]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-ee49282f461b4c8ad179f79dd5bcdf93124561074c64a771366caf93e99b9320R43-R47))replace-version.ps1: Introduced a PowerShell script to generate the package version usingsetuptools-git-versioning. ([replace-version.ps1R1-R3](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-b43fafec87dfaa3e667c15e5b5ad039a1907e3688db1f71f605669d850396ca3R1-R3))VERSIONandversioning/TARGET-VERSION: Added files to define the base version for versioning. ([[1]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-7b60b8e351cbb80c47459ffe2c79f1a26404871f49294780fe47ad0e58c09350R1),[[2]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-5fb00e93acb593ba0af3b14300cc46f59a3b009bc8994de90e74d12c45a871e5R1))Library-specific updates:
Dynamic versioning in
pyproject.tomlfiles:dynamic = ["version"]field instead of hardcoding the version. ([[1]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-3e0e51c7aba7842311a7aaeb01cf77493d562b9d827f8355d1b22476dea9c6d0L2-R8),[[2]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-bc88c0d181ebfa187bd3931dd4fdac72266a5faac06a5032620b097deb87182eL2-R7),[[3]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-c224a7d83293379e5afe7c6dd530a088e17c01afedb6b758a046bde44f664aabL7-R7),[[4]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-98598a3ee0ba7cdf4bf04d9d6993879c941655a90a75378b3a0c29ca11a5b101L7-R7),[[5]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-f742ce29c2b1677fde2f3f9bb26db3b8c2aaa76cc912de831612a1c76deb6236L7-R7),[[6]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-b44c9e8dc66f909063c8c7d242b4d9bbad95dbe52f139cdf0928a54ed176e356L7-R7),[[7]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-d0f21a3f6a71ca6d4d180552d03060650a81e8b500d07e68c1d1d6a9d5a2e749L7-R7))pyproject.tomlfiles, moving them tosetup.py. ([[1]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-bc88c0d181ebfa187bd3931dd4fdac72266a5faac06a5032620b097deb87182eL16-L21),[[2]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-c224a7d83293379e5afe7c6dd530a088e17c01afedb6b758a046bde44f664aabL16-L18),[[3]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-98598a3ee0ba7cdf4bf04d9d6993879c941655a90a75378b3a0c29ca11a5b101L16-L19),[[4]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-f742ce29c2b1677fde2f3f9bb26db3b8c2aaa76cc912de831612a1c76deb6236L16-L22),[[5]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-b44c9e8dc66f909063c8c7d242b4d9bbad95dbe52f139cdf0928a54ed176e356L16-L19),[[6]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-d0f21a3f6a71ca6d4d180552d03060650a81e8b500d07e68c1d1d6a9d5a2e749L16-L20))setup.pyupdates for dynamic versioning:setup.pyfiles for all libraries to dynamically retrieve the version from thePackageVersionenvironment variable and define dependencies. ([[1]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-18999a1e4c55b90177b8d0bbf3505873351ed4ed125483c470cbd0df0d0b4282R1-R8),[[2]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-3d3a4461e938a05d0ff6e3c99b079dccef608f87c3d1c4160325dbb607bb0a2eR1-R14),[[3]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-9e25a1e1b2f666ceac33ac1bd7963386ef3ee2cae1c8818c00e31ab88b5ea8ffR1-R11),[[4]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-146f7de6afb74b470e3fddeb9cdd831b0cb0196127f77736d4b9d68fc7efb9bdR1-R12),[[5]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-0f4e9b3b0be902a1d965b0968d87a7a7fe3a775354c7c1add038ae67d9b32513R1-R15),[[6]](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-1fcc1182889e8d07d2fe2aed4e135b75e05bc927ba725977af9dafbb1b7350b2R1-R13))Helper module for versioning:
versioning/helper/__init__.py: Added a helper module to expose versioning utilities. ([versioning/helper/__init__.pyR1-R3](https://github.com/microsoft/Agents-for-python/pull/72/files#diff-1cb2c42e5fafd9ed22d3d0116f47955ded8df82dff8a2ccafc40565bb674b48fR1-R3))