Skip to content

Commit

Permalink
docs: Remove 'pip install' options in recipes
Browse files Browse the repository at this point in the history
* Remove --no-deps, --no-build-isolation, and --ignore-installed 'pip install'
  options in recipes as conda-build will enforce all required 'pip install'
  options itself at build time.
  • Loading branch information
matthewfeickert committed Nov 17, 2024
1 parent 0ad4bb6 commit 5e9d127
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2007,7 +2007,7 @@ def bundle_wheel(
dest_file = os.path.join(metadata.config.work_dir, "wheel_output" + ext)
with open(dest_file, "w") as f:
f.write("\n")
f.write(f"pip wheel --wheel-dir {tmpdir} --no-deps .")
f.write(f"pip wheel --wheel-dir {tmpdir} .")
f.write("\n")
if metadata.config.activate:
_write_activation_text(dest_file, metadata)
Expand Down
2 changes: 1 addition & 1 deletion conda_build/skeletons/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def skeletonize(
ordered_recipe["build"]["noarch"] = "python"

recipe_script_cmd = [
"{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation"
"{{ PYTHON }} -m pip install . -vv"
]
ordered_recipe["build"]["script"] = " ".join(
recipe_script_cmd + setup_options
Expand Down
2 changes: 1 addition & 1 deletion conda_build/templates/setuptools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
number: {% block build_number -%}1{%- endblock %}
script:
- cd $RECIPE_DIR
- pip install --no-deps .
- pip install .

{% block entry_points -%}
entry_points: {{data.get('entry_points', {}).get('console_scripts', [])}}
Expand Down
2 changes: 1 addition & 1 deletion docs/click/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source:

build:
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv "
script: "{{ PYTHON }} -m pip install . -vv "

requirements:
host:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/resources/define-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All the metadata in the conda-build recipe is specified in the
build:
noarch: python
number: 0
script: python -m pip install --no-deps --ignore-installed .
script: python -m pip install .
requirements:
host:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/tutorials/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source:

build:
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv "
script: "{{ PYTHON }} -m pip install . -vv "

requirements:
host:
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source:
git_url: ../

build:
script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv
script: {{ PYTHON }} -m pip install . -vv
entry_points:
- conda-build = conda_build.cli.main_build:execute
- conda-convert = conda_build.cli.main_convert:execute
Expand Down
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/_noarch_none/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source:
path: ./noarch_test_package

build:
script: pip install --no-deps .
script: pip install .
noarch: none

requirements:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source:

build:
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv "
script: "{{ PYTHON }} -m pip install . -vv "

requirements:
host:
Expand Down
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/_render_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:
script:
- {{ PYTHON }} conf/cythonize.py
- export PETSC_DIR=$PREFIX
- {{ PYTHON }} -m pip -v install --no-deps .
- {{ PYTHON }} -m pip -v install .
skip: true # [win]
track_features:
- petsc4py_complex # [scalar == "complex"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/entry_points/bld.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: cd %RECIPE_DIR%\..\..\test-package
:: pip install --no-deps .
:: pip install .
python setup.py install --old-and-unmanageable
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/entry_points/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# conda-build/tests/test-recipes/test-package
# cd $RECIPE_DIR/../../test-package

# pip install --no-deps .
# pip install .
python setup.py install --old-and-unmanageable
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source:
build:
number: 0
script:
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- {{ PYTHON }} -m pip install . -vvv

requirements:
host:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:
noarch: python
skip: True # [win]
script:
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- {{ PYTHON }} -m pip install . -vvv
# We use 'somewhere' instead of 'bin' here because conda-build is quite broken in what it considers
# and entry point script when you use noarch: python, involving finding files in 'bin' that contain
# prefix and making assumptions about that (we could check for python in the shebang at least, but
Expand Down
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/jinja_load_toml/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ requirements:
{% endfor %}

build:
script: {{ PYTHON }} -m pip install --no-deps --ignore-installed .
script: {{ PYTHON }} -m pip install .
noarch: python
2 changes: 1 addition & 1 deletion tests/test-recipes/metadata/jinja_load_yaml/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ requirements:
{% endfor %}

build:
script: {{ PYTHON }} -m pip install --no-deps --ignore-installed .
script: {{ PYTHON }} -m pip install .
noarch: python
4 changes: 2 additions & 2 deletions tests/test_pypi_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_print_dict():
},
"build": {
"number": 0,
"script": "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation",
"script": "{{ PYTHON }} -m pip install . -vv",
},
}
recipe_order = ["package", "source", "build", "about"]
Expand All @@ -74,7 +74,7 @@ def test_print_dict():
build:
number: 0
script: "{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation"
script: "{{ PYTHON }} -m pip install . -vv"
about:
home: "https://conda.io"
Expand Down

0 comments on commit 5e9d127

Please sign in to comment.