Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Types of changes:
### Dependencies

### Other
- Fixed the pre-release build stamping a version that `pyqasm.__version__` and the package metadata spelled differently. `pre_build.sh` wrote `1.1.0-a.0` into `pyproject.toml`, setuptools normalized that to `1.1.0a0` for the metadata, and `_version.py` kept the raw string, so `pip show pyqasm` and `pyqasm.__version__` disagreed and `test_sdist.sh` failed its version check. The stamped version is now normalized to PEP 440 before it is written. ([#414](https://github.com/qBraid/pyqasm/pull/414))
- Fixed the pre-release workflow publishing its source distribution under the released version instead of the pre-release one. `build_sdist.sh` ran `git reset --hard` and `git clean -xdf`, which discarded the `pyproject.toml` version that the preceding step had just stamped, so a run that built `1.1.0a0` wheels built a `1.1.0` sdist and PyPI rejected it as a duplicate. `pre_build.sh` already resets the tree, so the second reset is gone. It also no longer destroys uncommitted work when the script is run locally. ([#413](https://github.com/qBraid/pyqasm/pull/413))
- Added a `SECURITY.md` with a private vulnerability disclosure path. There was no documented way to report one, leaving a public issue or a guessed email address as the only options. Reports now go through this repository's GitHub security advisory form. ([#383](https://github.com/qBraid/pyqasm/pull/383))

Expand Down
5 changes: 4 additions & 1 deletion bin/cibw/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ if [[ ${PRE_RELEASE_BUILD:-false} == "true" ]]; then

# Get the path to .toml file
PYPROJECT_TOML_PATH="${project}/pyproject.toml"
DEV_VERSION="${PRE_RELEASE_VERSION}"

# Normalize to PEP 440, so that pyproject.toml, _version.py and the package
# metadata all spell the version the same way, eg 1.1.0-a.0 -> 1.1.0a0
DEV_VERSION=$(python -c "from packaging.version import Version; print(Version('${PRE_RELEASE_VERSION}'))")

# Update the version in the .toml file
echo "Setting version to ${DEV_VERSION}"
Expand Down
Loading