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

Put back Python_EXECUTABLE in setup.py. #461

Merged
merged 7 commits into from
Jun 21, 2023
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
4 changes: 4 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

### Bug fixes

* Fixing Python version bug introduce in [(#450)](https://github.com/PennyLaneAI/pennylane-lightning/pull/450)
when `Python_EXECUTABLE` was removed from `setup.py`.
[(#461)](https://github.com/PennyLaneAI/pennylane-lightning/pull/461)

* Ensure aligned allocator definition works with C++20 compilers.
[(#438)](https://github.com/PennyLaneAI/pennylane-lightning/pull/438)

Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"""


__version__ = "0.31.0-dev8"
__version__ = "0.31.0-dev9"
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import platform
import subprocess
import shutil
import sys
from pathlib import Path
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
Expand Down Expand Up @@ -59,6 +60,11 @@ def build_extension(self, ext: CMakeExtension):
f"-DCMAKE_BUILD_TYPE={build_type}", # not used on MSVC, but no harm
"-DENABLE_WARNINGS=OFF", # Ignore warnings
]
configure_args += (
[f"-DPYTHON_EXECUTABLE={sys.executable}"]
if platform.system() == "Linux"
else [f"-DPython_EXECUTABLE={sys.executable}"]
)

if platform.system() == "Windows":
# As Ninja does not support long path for windows yet:
Expand Down