Skip to content

Commit

Permalink
Mark conda_build.build.check_external() for deprecation (#5355)
Browse files Browse the repository at this point in the history
Co-authored-by: Bianca Henderson <bhenderson@anaconda.com>
  • Loading branch information
kenodegard and beeankha authored May 23, 2024
1 parent 5f5eebe commit 1d390f8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from . import environ, noarch_python, source, tarcheck, utils
from .config import Config
from .create_test import create_all_test_files
from .deprecations import deprecated
from .exceptions import (
BuildScriptException,
CondaBuildException,
Expand Down Expand Up @@ -3527,6 +3528,11 @@ def tests_failed(package_or_metadata, move_broken, broken_dir, config):
sys.exit("TESTS FAILED: " + os.path.basename(pkg))


@deprecated(
"24.7",
"24.9",
addendum="`patchelf` is an explicit conda-build dependency on Linux so it will always be installed.",
)
def check_external():
if on_linux:
patchelf = external.find_executable("patchelf")
Expand Down
1 change: 0 additions & 1 deletion conda_build/cli/main_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ def execute(args: Sequence[str] | None = None) -> int:
context.__init__(argparse_args=parsed)

config = get_or_merge_config(None, **parsed.__dict__)
build.check_external()

# change globals in build module, see comment there as well
config.channel_urls = get_channel_urls(parsed.__dict__)
Expand Down
19 changes: 19 additions & 0 deletions news/5355-deprecate-check_external
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* Mark `conda_build.build.check_external` for deprecation. `patchelf` is an explicit conda-build dependency on Linux so it will always be installed. (#5355)

### Docs

* <news item>

### Other

* <news item>
5 changes: 5 additions & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,8 @@ def test_guess_interpreter(
):
with pytest.raises(error) if error else nullcontext():
assert build.guess_interpreter(script) == interpreter


def test_check_external():
with pytest.deprecated_call():
build.check_external()

0 comments on commit 1d390f8

Please sign in to comment.