Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH patch data for fftw #21

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,13 @@ def _gen_new_index(repodata, subdir):
if subdir == "osx-64":
_fix_libgfortran(fn, record)
_fix_libcxx(fn, record)

full_pkg_name = fn.replace('.tar.bz2', '')
if full_pkg_name in OSX_SDK_FIXES:
_set_osx_virt_min(fn, record, OSX_SDK_FIXES[full_pkg_name])

# make sure fftw is bounded properly
_fix_fftw_3x_pins(fn, record)

return index


Expand All @@ -439,6 +441,30 @@ def _rename_dependency(fn, record, old_name, new_name):
record['depends'] = depends


def _fix_fftw_3x_pins(fn, record):
"""For fftw 3, we should add an upper bound of <4.0.0.a0"""
depends = record.get("depends", ())
dep_idx = next(
(q for q, dep in enumerate(depends)
if dep.split(' ')[0] == "fftw"),
None
)
if dep_idx is not None:
if depends[dep_idx] == 'fftw':
# this case is ambiguous so pass on fixing
pass
elif '>=3' not in depends[dep_idx]:
# here we have some other version so pass again
pass
elif '<4' in depends[dep_idx]:
# already has an upper bound so pass again
pass
else:
# by here, we have a dep of fftw with >=3 in it and <4 not
depends[dep_idx] = depends[dep_idx] + ",<4.0.0.a0"
record['depends'] = depends


def _fix_libgfortran(fn, record):
depends = record.get("depends", ())
dep_idx = next(
Expand Down