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 d570a9c
Showing 1 changed file with 8 additions and 2 deletions.
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 d570a9c

Please sign in to comment.