From 63bf8a6c08c1415a2e675639971b14a4dd4a0688 Mon Sep 17 00:00:00 2001 From: Jack Olivieri Date: Wed, 30 Aug 2023 17:32:34 +0200 Subject: [PATCH] Conform to recipe standards (#4960) Co-authored-by: Jannis Leidel Co-authored-by: Ken Odegard Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- conda_build/skeletons/pypi.py | 4 +++- news/4960-conform-to-recipe-standards | 19 +++++++++++++++++++ tests/test_pypi_skeleton.py | 4 ++-- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 news/4960-conform-to-recipe-standards diff --git a/conda_build/skeletons/pypi.py b/conda_build/skeletons/pypi.py index 9693d41933..b1194e6a8b 100644 --- a/conda_build/skeletons/pypi.py +++ b/conda_build/skeletons/pypi.py @@ -431,7 +431,9 @@ def skeletonize( if noarch_python: ordered_recipe["build"]["noarch"] = "python" - recipe_script_cmd = ["{{ PYTHON }} -m pip install . -vv"] + recipe_script_cmd = [ + "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation" + ] ordered_recipe["build"]["script"] = " ".join( recipe_script_cmd + setup_options ) diff --git a/news/4960-conform-to-recipe-standards b/news/4960-conform-to-recipe-standards new file mode 100644 index 0000000000..a28b5f6c89 --- /dev/null +++ b/news/4960-conform-to-recipe-standards @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* When templating new recipes from a pypi package, the build script `{{ PYTHON }} -m pip install . -vv` is deprecated in favor of `{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation`. (#4960) + +### Docs + +* + +### Other + +* diff --git a/tests/test_pypi_skeleton.py b/tests/test_pypi_skeleton.py index 6562a50f14..20581ef14d 100644 --- a/tests/test_pypi_skeleton.py +++ b/tests/test_pypi_skeleton.py @@ -58,7 +58,7 @@ def test_print_dict(): }, "build": { "number": 0, - "script": "{{ PYTHON }} -m pip install . -vv", + "script": "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation", }, } recipe_order = ["package", "source", "build", "about"] @@ -74,7 +74,7 @@ def test_print_dict(): build: number: 0 - script: "{{ PYTHON }} -m pip install . -vv" + script: "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation" about: home: "https://conda.io"