Skip to content

Commit

Permalink
avoid excluding pyside6==6.7.0 (not found on conda-forge)
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Oct 24, 2024
1 parent 536558b commit 1fb1e27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions tools/hooks/update_environment_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 1fb1e27

Please sign in to comment.