Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Fix - changed format of version string in pyproject.toml #3777

Merged
merged 9 commits into from
Sep 2, 2022

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Sep 1, 2022

Brief description

Since Poetry 1.2 version in .toml must follow PEP-440, in our case there must not be dash sign. Plus sign is valid though.

Additional info

Version in pyproject.toml is not used anywhere yet (only maybe when uploading wheel to pip, which is not really used).

Since Poetry 1.2 version in .toml must follow PEP-440, in our case there must not be dash sign. Plus sign is valid though.

Version in pyproject.toml is not used anywhere yet (only maybe when uploading wheel to pip, which is not really used).
@kalisp kalisp self-assigned this Sep 1, 2022
tools/ci_tools.py Outdated Show resolved Hide resolved
tools/ci_tools.py Show resolved Hide resolved
@kalisp kalisp marked this pull request as draft September 1, 2022 16:17
Old version caused "No module named 'distutils.command.bdist_msi'" error
Old version caused "No module named 'distutils.command.bdist_msi'" error
@kalisp kalisp marked this pull request as ready for review September 2, 2022 10:22
@kalisp kalisp requested a review from 64qam September 2, 2022 10:22
Latest 1.2 version breaks build because cx-freeze. Latest cx-freeze works on Win, fails on Linux.
@@ -101,7 +101,7 @@ def bump_file_versions(version):

# bump pyproject.toml
filename = "pyproject.toml"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(\+((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
Copy link
Member

Choose a reason for hiding this comment

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

just a note that in semver, you can have + for the build number. This regex won't match `
image

Copy link
Member

Choose a reason for hiding this comment

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

But that can wait for proper PEP-440 version normalization.

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

It fixes build problems even if it is leaving proper PEP-440 resolution open, so I am for merging it.

@@ -101,7 +101,7 @@ def bump_file_versions(version):

# bump pyproject.toml
filename = "pyproject.toml"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(\+((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
Copy link
Member

Choose a reason for hiding this comment

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

But that can wait for proper PEP-440 version normalization.

@antirotor antirotor added the type: bug Something isn't working label Sep 2, 2022
@antirotor antirotor merged commit b924ced into develop Sep 2, 2022
@kalisp kalisp deleted the chore/fix_poetry_toml_version_format branch September 6, 2022 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants