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

Fix run export substring check #5575

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*~
*.pyc
*.egg-info
*.swp
build/
dist/
docs/_build
Expand Down
2 changes: 1 addition & 1 deletion conda_build/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def get_upstream_pins(m: MetaData, precs, env):
ignore_list = utils.ensure_list(m.get_value("build/ignore_run_exports"))
additional_specs = {}
for prec in precs:
if any(prec.name in req.split(" ")[0] for req in ignore_pkgs_list):
if any((prec.name == req.split(" ")[0]) for req in ignore_pkgs_list):
continue
run_exports = None
if m.config.use_channeldata:
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ menuinst >=2
packaging
pkginfo
psutil
py-lief
py-lief <0.15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#5565 should make this unnecessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on when PRs get reviewed happy to remove this change or switch up the merge order as is convenient.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, I could merge or rebase on main and undo this inside #5565 if this gets merged first. Defer to maintainers on what order they'd rather merge in.

python >=3.9
python-libarchive-c
pytz
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package:
name: pkg
version: 1.0.0

build:
number: 0
ignore_run_exports_from:
- i-like-python

requirements:
host:
- python
run:
- numpy
5 changes: 5 additions & 0 deletions tests/test_api_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2097,3 +2097,8 @@ def test_api_build_inject_jinja2_vars_on_first_pass(testing_config):

testing_config.variant = {"python_min": "3.12"}
api.build(recipe_dir, config=testing_config)


def test_ignore_run_exports_from_substr(tmp_path):
with tmp_path:
api.build(str(metadata_path / "ignore_run_exports_from_substr"))
Loading