Skip to content

fix pypi publishing#295

Merged
olehnikolaiev merged 2 commits into
developfrom
fix-pypi-publishing
Feb 17, 2026
Merged

fix pypi publishing#295
olehnikolaiev merged 2 commits into
developfrom
fix-pypi-publishing

Conversation

@olehnikolaiev

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 13:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to fix PyPI publishing by dynamically updating the version number in the Python setup file before building the distribution package. The change extracts the current version from setup.py and uses sed to replace it with the calculated PACKAGE_VERSION environment variable that is determined earlier in the workflow.

Changes:

  • Added version extraction and replacement logic in the "Build t-encrypt Python distributions" step to dynamically update the package version before building

Comment thread .github/workflows/publish.yml Outdated
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel twine
CURRENT_VERSION="$(python setup.py --version)"
sed -i "s/${CURRENT_VERSION}/${PACKAGE_VERSION}/g" setup.py

Copilot AI Feb 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable substitution in the sed command lacks proper quoting, which could cause failures if the version strings contain special characters (like dots, which are regex metacharacters). Consider using a delimiter that's less likely to appear in version strings, or escape the version string properly. For example, use sed -i "s|${CURRENT_VERSION}|${PACKAGE_VERSION}|g" with pipe delimiters, or properly escape the variables.

Suggested change
sed -i "s/${CURRENT_VERSION}/${PACKAGE_VERSION}/g" setup.py
sed -i "s|${CURRENT_VERSION}|${PACKAGE_VERSION}|g" setup.py

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/publish.yml Outdated
@olehnikolaiev olehnikolaiev merged commit 6c0cbcb into develop Feb 17, 2026
5 of 6 checks passed
@olehnikolaiev olehnikolaiev deleted the fix-pypi-publishing branch February 17, 2026 17:36
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants