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

MNT: Default to '--no-deps --no-build-isolation' for Python build scripts #2137

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 conda_smithy/templates/meta.yaml.ci-skel.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ build:
# and for all major OSs. Add the line "skip: True # [py<35]" (for example)
# to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit
# to Windows.
script: "{{ PYTHON }} -m pip install . -vv"
script: "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation"

requirements:
build:
Expand Down
3 changes: 3 additions & 0 deletions news/pip-no-deps-no-build-isolation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Added:**

* Add ``--no-deps --no-build-isolation`` ``pip`` install options to ensure all ``build-system`` dependencies are included as ``host`` requirements.
2 changes: 1 addition & 1 deletion tests/test_ci_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# and for all major OSs. Add the line "skip: True # [py<35]" (for example)
# to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit
# to Windows.
script: "{{ PYTHON }} -m pip install . -vv"
script: "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation"

requirements:
build:
Expand Down
14 changes: 7 additions & 7 deletions tests/test_lint_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2502,10 +2502,10 @@ def test_lint_duplicate_cfyml():
sha256: a32e28b3e321bdb802f28a5f04d1df65071ab42eef06a6dc15ed656780c0361e # [win and py==310]
build:
skip: true # [py<38 or python_impl == 'pypy' or (win and py==311)]
script: {{ PYTHON }} -m pip install . -vv # [unix]
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation # [unix]
script_env: # [osx and arm64]
- SKBUILD_CONFIGURE_OPTIONS=-DWITH_CBOOL_EXITCODE=0 -DWITH_CBOOL_EXITCODE__TRYRUN_OUTPUT='' -Df03real128_EXITCODE=1 -Df03real128_EXITCODE__TRYRUN_OUTPUT='' -Df18errorstop_EXITCODE=1 -Df18errorstop_EXITCODE__TRYRUN_OUTPUT='' # [osx and arm64]
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-cp{{ CONDA_PY }}-cp{{ CONDA_PY }}-win_amd64.whl -vv # [win]
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-cp{{ CONDA_PY }}-cp{{ CONDA_PY }}-win_amd64.whl -vv --no-deps --no-build-isolation # [win]
number: 3
""",
"PyPI default URL is now pypi.org",
Expand Down Expand Up @@ -2541,10 +2541,10 @@ def test_hint_recipe(tmp_path, yaml_block: str, expected_message: str):
sha256: a32e28b3e321bdb802f28a5f04d1df65071ab42eef06a6dc15ed656780c0361e # [win and py==310]
build:
skip: true # [py<38 or python_impl == 'pypy' or (win and py==311)]
script: {{ PYTHON }} -m pip install . -vv # [unix]
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation # [unix]
script_env: # [osx and arm64]
- SKBUILD_CONFIGURE_OPTIONS=-DWITH_CBOOL_EXITCODE=0 -DWITH_CBOOL_EXITCODE__TRYRUN_OUTPUT='' -Df03real128_EXITCODE=1 -Df03real128_EXITCODE__TRYRUN_OUTPUT='' -Df18errorstop_EXITCODE=1 -Df18errorstop_EXITCODE__TRYRUN_OUTPUT='' # [osx and arm64]
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-cp{{ CONDA_PY }}-cp{{ CONDA_PY }}-win_amd64.whl -vv # [win]
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-cp{{ CONDA_PY }}-cp{{ CONDA_PY }}-win_amd64.whl -vv --no-deps --no-build-isolation # [win]
number: 3
""",
"lint",
Expand Down Expand Up @@ -2574,9 +2574,9 @@ def test_hint_recipe(tmp_path, yaml_block: str, expected_message: str):
noarch: python
number: 0
{% if use_wheel %}
script: "{{ PYTHON }} -m pip install --no-deps --ignore-installed --no-cache-dir -vvv *.whl"
script: "{{ PYTHON }} -m pip install --no-deps --no-build-isolation --ignore-installed --no-cache-dir -vvv *.whl"
{% else %}
script: "{{ PYTHON }} -m pip install --no-deps --ignore-installed --no-cache-dir -vvv ."
script: "{{ PYTHON }} -m pip install --no-deps --no-build-isolation --ignore-installed --no-cache-dir -vvv ."
{% endif %}
""",
"hint",
Expand All @@ -2600,7 +2600,7 @@ def test_hint_recipe(tmp_path, yaml_block: str, expected_message: str):
noarch: python
entry_points:
- weasyprint = weasyprint.__main__:main
script: {{ PYTHON }} -m pip install {{ name|lower }}-{{ version }}-py3-none-any.whl -vv
script: {{ PYTHON }} -m pip install {{ name|lower }}-{{ version }}-py3-none-any.whl -vv --no-deps --no-build-isolation
""",
"hint",
id="weasyprint",
Expand Down
Loading