diff --git a/environment.yml b/environment.yml index 2790c64acd7..716928e35b4 100644 --- a/environment.yml +++ b/environment.yml @@ -38,7 +38,7 @@ dependencies: - pyarrow - pybv - pymatreader - - PySide6 !=6.7.0,!=6.8.0,!=6.8.0.1 + - PySide6 !=6.8.0,!=6.8.0.1 - python-neo - python-picard - pyvista >=0.32,!=0.35.2,!=0.38.0,!=0.38.1,!=0.38.2,!=0.38.3,!=0.38.4,!=0.38.5,!=0.38.6,!=0.42.0 diff --git a/tools/hooks/update_environment_file.py b/tools/hooks/update_environment_file.py index c624a22e13c..f9e34ad7dbd 100755 --- a/tools/hooks/update_environment_file.py +++ b/tools/hooks/update_environment_file.py @@ -44,14 +44,20 @@ def split_dep(dep): # python version req_python = remove_spaces(pyproj["project"]["requires-python"]) -# handle package name differences, and split package name from version spec +# split package name from version spec translations = dict(neo="python-neo") pip_deps = set() conda_deps = set() for dep in deps: package_name, version_spec = split_dep(dep) + # handle package name differences package_name = translations.get(package_name, package_name) - line = f" - {package_name} {version_spec}".rstrip() # rstrip in case spec == "" + # PySide6==6.7.0 only exists on PyPI, not conda-forge, so excluding it in + # `environment.yaml` breaks the solver + if package_name == "PySide6": + version_spec = version_spec.replace("!=6.7.0,", "") + # rstrip output line in case `version_spec` == "" + line = f" - {package_name} {version_spec}".rstrip() # use pip for packages needing e.g. `platform_system` or `python_version` triaging if ";" in version_spec: pip_deps.add(f" {line}")