aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2023-08-24 17:18:42 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-24 17:18:42 -0700
commitfecc462ed64ca1bae1f8de13d277a2ea678b12c2 (patch)
treeb75909f473759949faa6feb4787e892ce15ca432 /setup.py
parent201099c6f784a4ea04ef752c73e2ad7e8daf684e (diff)
downloadWarpX-fecc462ed64ca1bae1f8de13d277a2ea678b12c2.tar.gz
WarpX-fecc462ed64ca1bae1f8de13d277a2ea678b12c2.tar.zst
WarpX-fecc462ed64ca1bae1f8de13d277a2ea678b12c2.zip
Fix: WarpX Version (#4218)
* Fix: WarpX Version Fix the WarpX version info. * Fix Version: pyWarpX * Version: More Python __version__
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 42ec635f6..8d14aaa09 100644
--- a/setup.py
+++ b/setup.py
@@ -108,6 +108,8 @@ class CMakeBuild(build_ext):
'-DWarpX_QED_TABLE_GEN:BOOL=' + WARPX_QED_TABLE_GEN,
## dependency control (developers & package managers)
'-DWarpX_amrex_internal=' + WARPX_AMREX_INTERNAL,
+ # PEP-440 conformant version from package
+ "-DpyWarpX_VERSION_INFO=" + self.distribution.get_version(),
# see PICSAR and openPMD below
## static/shared libs
'-DBUILD_SHARED_LIBS:BOOL=' + BUILD_SHARED_LIBS,
@@ -173,17 +175,11 @@ class CMakeBuild(build_ext):
build_args += ['--parallel', BUILD_PARALLEL]
- env = os.environ.copy()
- env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(
- env.get('CXXFLAGS', ''),
- self.distribution.get_version()
- )
build_dir = os.path.join(self.build_temp, dims)
os.makedirs(build_dir, exist_ok=True)
subprocess.check_call(
['cmake', ext.sourcedir] + cmake_args,
- cwd=build_dir,
- env=env
+ cwd=build_dir
)
subprocess.check_call(
['cmake', '--build', '.'] + build_args,