Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python compiled module linkage and path under Windows #400

Merged
merged 9 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
17 changes: 6 additions & 11 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Release 0.29.0-dev

### New features since last release

### Breaking changes

### Improvements

### Documentation
# Release 0.28.1

### Bug fixes

* Fix Pybind11 module versioning and locations for Windows wheels.
[(#400)](https://github.com/PennyLaneAI/pennylane-lightning/pull/400)

### Contributors

This release contains contributions from (in alphabetical order):

Lee J. O'Riordan

---

# Release 0.28.0
Expand All @@ -31,8 +28,6 @@ This release contains contributions from (in alphabetical order):
* Improve the stopping condition method.
[(#386)](https://github.com/PennyLaneAI/pennylane-lightning/pull/386)

### Documentation

### Bug fixes

- Pin CMake to 3.24.x in wheel-builder to avoid Python not found error in CMake 3.25, when building wheels for PennyLane-Lightning-GPU.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:
title: Version Bump
body: updated changelog and _version.py
branch: post-release-version-bump
reviewers: antalszava
reviewers: mlxd
base: master
24 changes: 22 additions & 2 deletions .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
-Destination "D:\a\pennylane-lightning\pennylane-lightning\Kokkos" -Recurse -Force

- name: Install cibuildwheel
run: python -m pip install cibuildwheel~=2.11.0
run: python -m pip install cibuildwheel~=2.11.0 wheel

- name: Build wheels
env:
Expand All @@ -145,7 +145,7 @@ jobs:

# Python build settings
CIBW_BEFORE_BUILD: |
pip install pybind11 cmake~=3.24.0
pip install pybind11 cmake~=3.24.0 build

# Testing of built wheels
CIBW_TEST_REQUIRES: numpy~=1.21 scipy pytest pytest-cov pytest-mock flaky
Expand All @@ -160,8 +160,28 @@ jobs:

CIBW_BUILD_VERBOSITY: 3

CIBW_BUILD_FRONTEND: build

run: python -m cibuildwheel --output-dir wheelhouse

- name: Patch wheels
run: |
cd wheelhouse
$wheels = Get-ChildItem "./" -Filter *.whl
foreach ($i in $wheels){
python -m wheel unpack $i.Name
$name = $i.Name
$dirName = python -c "s = '$name'; print('-'.join(s.split('-')[0:2]))"
if (Test-Path -Path $dirName\pennylane_lightning\RelWithDebInfo) {
Move-Item -Path $dirName\pennylane_lightning\RelWithDebInfo\* -Destination $dirName\pennylane_lightning
Remove-Item $dirName\pennylane_lightning\RelWithDebInfo -Recurse
python -m wheel pack $dirName
echo "Patched $name"
}
Remove-Item $dirName -Recurse
}
cd ..

- uses: actions-ecosystem/action-regex-match@v2
id: rc_build
with:
Expand Down
3 changes: 1 addition & 2 deletions pennylane_lightning/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
Version number (major.minor.patch[-label])
"""


__version__ = "0.29.0-dev"
__version__ = "0.28.1"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def build_extension(self, ext: CMakeExtension):
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
configure_args = [
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}",
f"-DPYTHON_EXECUTABLE={sys.executable}",
f"-DPython_EXECUTABLE={sys.executable}",
"-DENABLE_WARNINGS=OFF", # Ignore warnings
]

Expand Down Expand Up @@ -115,7 +115,7 @@ def build_extension(self, ext: CMakeExtension):
requirements = [
"ninja",
"numpy",
"pennylane>=0.19",
"pennylane>=0.28",
]

info = {
Expand Down