From cfb3a8c27176282a0f8d884be90c61b2023438a0 Mon Sep 17 00:00:00 2001 From: Andrecho <37243793+andrewendlinger@users.noreply.github.com> Date: Fri, 20 Feb 2026 17:16:42 +0000 Subject: [PATCH] fix: use PEP 508 environment markers for hlsvdpro (Resolves #15) --- setup.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index e4c9754..2004068 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ import ast import glob import os -import platform from setuptools import find_packages, setup from setuptools.command.sdist import sdist as _sdist @@ -95,14 +94,13 @@ def run(self): "requests", "ipywidgets>=7.6.0,<8.0.0;python_version<'3.11'", # For older Python versions "ipywidgets>=8.0.0;python_version>='3.11'", # For newer Python versions + # Use the better-performing 'hlsvdpro' package if running on supported platforms + # (e.g., x86_64 or amd64 architectures). Otherwise, fall back to the custom + # 'hlsvdpropy' implementation located in pyAMARES/libs/hlsvd.py. + # (Refactored to PEP 508 markers in Issue #15 for Apple Silicon/uv compatibility) + "hlsvdpro>=2.0.0; platform_machine == 'x86_64' or platform_machine == 'amd64'", ] -# Use the better-performing 'hlsvdpro' package if running on supported platforms -# (e.g., x86_64 or amd64 architectures). Otherwise, fall back to the custom -# 'hlsvdpropy' implementation located in pyAMARES/libs/hlsvd.py. -if platform.machine().lower() in ["x86_64", "amd64"]: - install_requires.append("hlsvdpro>=2.0.0") - setup( name="pyAMARES",