From c4b3b69016f636e12082f750061d07bf25124e94 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 19:49:25 +0000 Subject: [PATCH 01/10] initial metadata --- .../meta.yaml | 28 ++++++ recipes/example/meta.yaml | 95 ------------------- 2 files changed, 28 insertions(+), 95 deletions(-) create mode 100644 recipes/conda-ecosystem-site-packages-isolation/meta.yaml delete mode 100644 recipes/example/meta.yaml diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml new file mode 100644 index 0000000000000..b2daaea830805 --- /dev/null +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -0,0 +1,28 @@ +package: + name: conda-ecosystem-site-packages-isolation + version: 0.1.0 + +build: + number: 1 + +test: + requires: + - python + commands: + - python -c "import sys, site; sys.exit(0 if site.ENABLE_USER_SITE==False else 1)" + +about: + home: http://conda-forge.org/ + summary: 'Prevent Python from searching for packages outside the current environment' + description: | + With respect to the list of locations searched by Python for packages, mimic the + default behavior of virtual environments created by Python's built-in "venv" module. + Python in a conda environment gets isolated from system site-packages, including user + site-packages. + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE.txt + +extra: + recipe-maintainers: + - itcarroll diff --git a/recipes/example/meta.yaml b/recipes/example/meta.yaml deleted file mode 100644 index 66aa12c04c2b9..0000000000000 --- a/recipes/example/meta.yaml +++ /dev/null @@ -1,95 +0,0 @@ -# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe -# If your package is python based, we recommend using Grayskull to generate it instead: -# https://github.com/conda-incubator/grayskull - -# Jinja variables help maintain the recipe as you'll update the version only here. -# Using the name variable with the URL in line 16 is convenient -# when copying and pasting from another recipe, but not really needed. -{% set name = "simplejson" %} -{% set version = "3.8.2" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - # If getting the source from GitHub, remove the line above, - # uncomment the line below, and modify as needed. Use releases if available: - # url: https://github.com/simplejson/simplejson/releases/download/{{ version }}/simplejson-{{ version }}.tar.gz - # and otherwise fall back to archive: - # url: https://github.com/simplejson/simplejson/archive/v{{ version }}.tar.gz - sha256: 2b3a0c466fb4a1014ea131c2b8ea7c519f9278eba73d6fcb361b7bdb4fd494e9 - # sha256 is the preferred checksum -- you can get it for a file with: - # `openssl sha256 `. - # You may need the openssl package, available on conda-forge: - # `conda install openssl -c conda-forge`` - -build: - # Uncomment the following line if the package is pure Python and the recipe is exactly the same for all platforms. - # It is okay if the dependencies are not built for all platforms/versions, although selectors are still not allowed. - # See https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python for more details. - # noarch: python - # If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key. - # By default, the package will be built for the Python versions supported by conda-forge 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. - # More info about selectors can be found in the conda-build docs: - # https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#preprocessing-selectors - script: {{ PYTHON }} -m pip install . -vv - number: 0 - -requirements: - build: - # If your project compiles code (such as a C extension) then add the required compilers as separate entries here. - # Compilers are named 'c', 'cxx' and 'fortran'. - - {{ compiler('c') }} - host: - - python - - pip - run: - - python - -test: - # Some packages might need a `test/commands` key to check CLI. - # List all the packages/modules that `run_test.py` imports. - imports: - - simplejson - - simplejson.tests - # For python packages, it is useful to run pip check. However, sometimes the - # metadata used by pip is out of date. Thus this section is optional if it is - # failing. - requires: - - pip - commands: - - pip check - -about: - home: https://github.com/simplejson/simplejson - summary: 'Simple, fast, extensible JSON encoder/decoder for Python' - description: | - simplejson is a simple, fast, complete, correct and extensible - JSON encoder and decoder for Python 2.5+ and - Python 3.3+. It is pure Python code with no dependencies, but includes - an optional C extension for a serious speed boost. - # Remember to specify the license variants for BSD, Apache, GPL, and LGPL. - # Use the SPDX identifier, e.g: GPL-2.0-only instead of GNU General Public License version 2.0 - # See https://spdx.org/licenses/ - license: MIT - # The license_family, i.e. "BSD" if license is "BSD-3-Clause". - # Optional - license_family: MIT - # It is required to include a license file in the package, - # (even if the license doesn't require it) using the license_file entry. - # Please also note that some projects have multiple license files which all need to be added using a valid yaml list. - # See https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#license-file - license_file: LICENSE.txt - # The doc_url and dev_url are optional. - doc_url: https://simplejson.readthedocs.io/ - dev_url: https://github.com/simplejson/simplejson - -extra: - recipe-maintainers: - # GitHub IDs for maintainers of the recipe. - # Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) - - LisaSimpson - - LandoCalrissian From 1ee1277c73294a8868aa9a17bf98df7742d3146c Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 21:11:16 +0000 Subject: [PATCH 02/10] add build.sh script and license --- .../LICENSE.txt | 13 +++++++++++++ .../build.sh | 4 ++++ .../meta.yaml | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt create mode 100644 recipes/conda-ecosystem-site-packages-isolation/build.sh diff --git a/recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt b/recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt new file mode 100644 index 0000000000000..6ec14012d91f9 --- /dev/null +++ b/recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt @@ -0,0 +1,13 @@ +BSD 3-clause license +Copyright (c) 2015-2022, conda-forge contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes/conda-ecosystem-site-packages-isolation/build.sh b/recipes/conda-ecosystem-site-packages-isolation/build.sh new file mode 100644 index 0000000000000..727f46f8aaea5 --- /dev/null +++ b/recipes/conda-ecosystem-site-packages-isolation/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +LINE='include-system-site-packages = false' +FILE=$PREFIX"/pyvenv.cfg" +grep -sxqF -- "$LINE" "$FILE" || echo "$LINE" >> "$FILE" diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml index b2daaea830805..317cb7b3732d3 100644 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -13,11 +13,11 @@ test: about: home: http://conda-forge.org/ - summary: 'Prevent Python from searching for packages outside the current environment' + summary: 'Prevent the environment's Python from searching for packages outside the environment' description: | With respect to the list of locations searched by Python for packages, mimic the default behavior of virtual environments created by Python's built-in "venv" module. - Python in a conda environment gets isolated from system site-packages, including user + Python in the conda environment gets isolated from system site-packages, including user site-packages. license: BSD-3-Clause license_family: BSD From de76820c06383b8dc2eb4d033996da2806e91472 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 16:16:49 -0500 Subject: [PATCH 03/10] reset build number --- recipes/conda-ecosystem-site-packages-isolation/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml index 317cb7b3732d3..b3fb03ac2fdcb 100644 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -3,7 +3,7 @@ package: version: 0.1.0 build: - number: 1 + number: 0 test: requires: From 750064c27847edf45c093005b69855223f506f69 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 21:34:54 +0000 Subject: [PATCH 04/10] restore the example --- recipes/example/meta.yaml | 95 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 recipes/example/meta.yaml diff --git a/recipes/example/meta.yaml b/recipes/example/meta.yaml new file mode 100644 index 0000000000000..66aa12c04c2b9 --- /dev/null +++ b/recipes/example/meta.yaml @@ -0,0 +1,95 @@ +# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe +# If your package is python based, we recommend using Grayskull to generate it instead: +# https://github.com/conda-incubator/grayskull + +# Jinja variables help maintain the recipe as you'll update the version only here. +# Using the name variable with the URL in line 16 is convenient +# when copying and pasting from another recipe, but not really needed. +{% set name = "simplejson" %} +{% set version = "3.8.2" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + # If getting the source from GitHub, remove the line above, + # uncomment the line below, and modify as needed. Use releases if available: + # url: https://github.com/simplejson/simplejson/releases/download/{{ version }}/simplejson-{{ version }}.tar.gz + # and otherwise fall back to archive: + # url: https://github.com/simplejson/simplejson/archive/v{{ version }}.tar.gz + sha256: 2b3a0c466fb4a1014ea131c2b8ea7c519f9278eba73d6fcb361b7bdb4fd494e9 + # sha256 is the preferred checksum -- you can get it for a file with: + # `openssl sha256 `. + # You may need the openssl package, available on conda-forge: + # `conda install openssl -c conda-forge`` + +build: + # Uncomment the following line if the package is pure Python and the recipe is exactly the same for all platforms. + # It is okay if the dependencies are not built for all platforms/versions, although selectors are still not allowed. + # See https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python for more details. + # noarch: python + # If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key. + # By default, the package will be built for the Python versions supported by conda-forge 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. + # More info about selectors can be found in the conda-build docs: + # https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#preprocessing-selectors + script: {{ PYTHON }} -m pip install . -vv + number: 0 + +requirements: + build: + # If your project compiles code (such as a C extension) then add the required compilers as separate entries here. + # Compilers are named 'c', 'cxx' and 'fortran'. + - {{ compiler('c') }} + host: + - python + - pip + run: + - python + +test: + # Some packages might need a `test/commands` key to check CLI. + # List all the packages/modules that `run_test.py` imports. + imports: + - simplejson + - simplejson.tests + # For python packages, it is useful to run pip check. However, sometimes the + # metadata used by pip is out of date. Thus this section is optional if it is + # failing. + requires: + - pip + commands: + - pip check + +about: + home: https://github.com/simplejson/simplejson + summary: 'Simple, fast, extensible JSON encoder/decoder for Python' + description: | + simplejson is a simple, fast, complete, correct and extensible + JSON encoder and decoder for Python 2.5+ and + Python 3.3+. It is pure Python code with no dependencies, but includes + an optional C extension for a serious speed boost. + # Remember to specify the license variants for BSD, Apache, GPL, and LGPL. + # Use the SPDX identifier, e.g: GPL-2.0-only instead of GNU General Public License version 2.0 + # See https://spdx.org/licenses/ + license: MIT + # The license_family, i.e. "BSD" if license is "BSD-3-Clause". + # Optional + license_family: MIT + # It is required to include a license file in the package, + # (even if the license doesn't require it) using the license_file entry. + # Please also note that some projects have multiple license files which all need to be added using a valid yaml list. + # See https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#license-file + license_file: LICENSE.txt + # The doc_url and dev_url are optional. + doc_url: https://simplejson.readthedocs.io/ + dev_url: https://github.com/simplejson/simplejson + +extra: + recipe-maintainers: + # GitHub IDs for maintainers of the recipe. + # Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) + - LisaSimpson + - LandoCalrissian From c50ed1a4424fdfca707556c1e449e202f18e3fee Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 21:38:44 +0000 Subject: [PATCH 05/10] remove meta.yaml lint --- recipes/conda-ecosystem-site-packages-isolation/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml index b3fb03ac2fdcb..5dfbc834f5517 100644 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -13,8 +13,8 @@ test: about: home: http://conda-forge.org/ - summary: 'Prevent the environment's Python from searching for packages outside the environment' - description: | + summary: Prevent the environment's Python from searching for packages outside the environment + description: > With respect to the list of locations searched by Python for packages, mimic the default behavior of virtual environments created by Python's built-in "venv" module. Python in the conda environment gets isolated from system site-packages, including user From bba70c6fa6d0624844bffb134a3b8054b71fe157 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Wed, 15 Nov 2023 21:56:33 +0000 Subject: [PATCH 06/10] what chat-gpt says --- recipes/conda-ecosystem-site-packages-isolation/bld.bat | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 recipes/conda-ecosystem-site-packages-isolation/bld.bat diff --git a/recipes/conda-ecosystem-site-packages-isolation/bld.bat b/recipes/conda-ecosystem-site-packages-isolation/bld.bat new file mode 100644 index 0000000000000..4e8b6729f14f2 --- /dev/null +++ b/recipes/conda-ecosystem-site-packages-isolation/bld.bat @@ -0,0 +1,4 @@ +@echo off +set "LINE=include-system-site-packages = false" +set "FILE=%PREFIX%\pyvenv.cfg" +findstr /x /c:"%LINE%" "%FILE%" >nul 2>nul || echo %LINE% >> "%FILE%" From 0c0aa9cf7d514cfcca3ccf46ac20bbcf13187e8f Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Thu, 16 Nov 2023 12:39:34 -0500 Subject: [PATCH 07/10] add suggestions --- recipes/conda-ecosystem-site-packages-isolation/meta.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml index 5dfbc834f5517..7447d92ba70f3 100644 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -5,6 +5,10 @@ package: build: number: 0 +requirements: + run_constrained: + - python >=3.3 + test: requires: - python @@ -26,3 +30,4 @@ about: extra: recipe-maintainers: - itcarroll + - mfansler From 2b8ee2d534e9392dbcc476e48107e4ae2d102030 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Thu, 16 Nov 2023 12:55:25 -0500 Subject: [PATCH 08/10] improve description --- recipes/conda-ecosystem-site-packages-isolation/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml index 7447d92ba70f3..6deecb0448cd1 100644 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml @@ -19,10 +19,10 @@ about: home: http://conda-forge.org/ summary: Prevent the environment's Python from searching for packages outside the environment description: > - With respect to the list of locations searched by Python for packages, mimic the - default behavior of virtual environments created by Python's built-in "venv" module. - Python in the conda environment gets isolated from system site-packages, including user - site-packages. + This package uses the mechanism provided by Python's `site` module to ignore + system-level and user site-packages via setting `include-system-site-packages=false` in + a prefix-level "pyvenv.cfg". This aligns Conda environments with the default behavior + of virtual environments created by Python's `venv`. license: BSD-3-Clause license_family: BSD license_file: LICENSE.txt From 003192c99ad4ea1b765c69ba5635e5de32e4ecd3 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Tue, 21 Nov 2023 03:48:31 +0000 Subject: [PATCH 09/10] refactor to post-create hook --- .../LICENSE.txt | 0 .../conda_create_no_user_site/__init__.py | 23 ++++++++++ recipes/conda-create-no-user-site/meta.yaml | 42 +++++++++++++++++++ .../conda-create-no-user-site/pyproject.toml | 13 ++++++ .../bld.bat | 4 -- .../build.sh | 4 -- .../meta.yaml | 33 --------------- 7 files changed, 78 insertions(+), 41 deletions(-) rename recipes/{conda-ecosystem-site-packages-isolation => conda-create-no-user-site}/LICENSE.txt (100%) create mode 100644 recipes/conda-create-no-user-site/conda_create_no_user_site/__init__.py create mode 100644 recipes/conda-create-no-user-site/meta.yaml create mode 100644 recipes/conda-create-no-user-site/pyproject.toml delete mode 100644 recipes/conda-ecosystem-site-packages-isolation/bld.bat delete mode 100644 recipes/conda-ecosystem-site-packages-isolation/build.sh delete mode 100644 recipes/conda-ecosystem-site-packages-isolation/meta.yaml diff --git a/recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt b/recipes/conda-create-no-user-site/LICENSE.txt similarity index 100% rename from recipes/conda-ecosystem-site-packages-isolation/LICENSE.txt rename to recipes/conda-create-no-user-site/LICENSE.txt diff --git a/recipes/conda-create-no-user-site/conda_create_no_user_site/__init__.py b/recipes/conda-create-no-user-site/conda_create_no_user_site/__init__.py new file mode 100644 index 0000000000000..1321c3efa692f --- /dev/null +++ b/recipes/conda-create-no-user-site/conda_create_no_user_site/__init__.py @@ -0,0 +1,23 @@ +from pathlib import Path + +from conda import plugins +from conda.base.context import context +from conda.core.prefix_data import PrefixData + + +def action(argv: list) -> None: + target_prefix = context.target_prefix + python = PrefixData(target_prefix).get("python", None) + if python: + pyvenv_cfg = Path(target_prefix, "pyvenv.cfg") + with pyvenv_cfg.open("x", encoding="utf-8") as f: + f.write("include-system-site-packages = false\n") + + +@plugins.hookimpl +def conda_post_commands(): + yield plugins.CondaPostCommand( + name="no-user-site", + action=action, + run_for={"create"}, + ) diff --git a/recipes/conda-create-no-user-site/meta.yaml b/recipes/conda-create-no-user-site/meta.yaml new file mode 100644 index 0000000000000..1a16ba65d2724 --- /dev/null +++ b/recipes/conda-create-no-user-site/meta.yaml @@ -0,0 +1,42 @@ +package: + name: conda-create-no-user-site + version: 0.1.0 + +source: + path: . + +build: + script: {{ PYTHON }} -m pip install . -vv + number: 0 + +requirements: + host: + - python + - pip + run_constrained: + - python>=3.3 + +test: + requires: + - python + commands: + - python -c "import sys, site; sys.exit(0 if site.ENABLE_USER_SITE==False else 1)" + +about: + home: http://conda-forge.org/ + summary: conda create will configure Python to ignore packages outside the environment + description: > + This package extends `conda create` to configure Python so it will ignore packages + installed with `pip install --user`. Envrionment creation will now add a + prefix-level "pyvenv.cfg" file with the line `include-system-site-packages = false`, + which gets read by Python's `site` module whenver Python is run. This aligns Python + in conda environments with the default behavior of virtual environments created by + Python's `venv` module. + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE.txt + +extra: + recipe-maintainers: + - itcarroll + - mfansler diff --git a/recipes/conda-create-no-user-site/pyproject.toml b/recipes/conda-create-no-user-site/pyproject.toml new file mode 100644 index 0000000000000..f08c72197c0b0 --- /dev/null +++ b/recipes/conda-create-no-user-site/pyproject.toml @@ -0,0 +1,13 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "conda-create-no-user-site" +version = "0.1.0" +description = "Create a pyvenv.cfg in an environment created by conda." +requires-python = ">=3.8" +dependencies = ["conda"] + +[project.entry-points.conda] +conda-create-no-user-site = "conda_create_no_user_site" diff --git a/recipes/conda-ecosystem-site-packages-isolation/bld.bat b/recipes/conda-ecosystem-site-packages-isolation/bld.bat deleted file mode 100644 index 4e8b6729f14f2..0000000000000 --- a/recipes/conda-ecosystem-site-packages-isolation/bld.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -set "LINE=include-system-site-packages = false" -set "FILE=%PREFIX%\pyvenv.cfg" -findstr /x /c:"%LINE%" "%FILE%" >nul 2>nul || echo %LINE% >> "%FILE%" diff --git a/recipes/conda-ecosystem-site-packages-isolation/build.sh b/recipes/conda-ecosystem-site-packages-isolation/build.sh deleted file mode 100644 index 727f46f8aaea5..0000000000000 --- a/recipes/conda-ecosystem-site-packages-isolation/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -LINE='include-system-site-packages = false' -FILE=$PREFIX"/pyvenv.cfg" -grep -sxqF -- "$LINE" "$FILE" || echo "$LINE" >> "$FILE" diff --git a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml b/recipes/conda-ecosystem-site-packages-isolation/meta.yaml deleted file mode 100644 index 6deecb0448cd1..0000000000000 --- a/recipes/conda-ecosystem-site-packages-isolation/meta.yaml +++ /dev/null @@ -1,33 +0,0 @@ -package: - name: conda-ecosystem-site-packages-isolation - version: 0.1.0 - -build: - number: 0 - -requirements: - run_constrained: - - python >=3.3 - -test: - requires: - - python - commands: - - python -c "import sys, site; sys.exit(0 if site.ENABLE_USER_SITE==False else 1)" - -about: - home: http://conda-forge.org/ - summary: Prevent the environment's Python from searching for packages outside the environment - description: > - This package uses the mechanism provided by Python's `site` module to ignore - system-level and user site-packages via setting `include-system-site-packages=false` in - a prefix-level "pyvenv.cfg". This aligns Conda environments with the default behavior - of virtual environments created by Python's `venv`. - license: BSD-3-Clause - license_family: BSD - license_file: LICENSE.txt - -extra: - recipe-maintainers: - - itcarroll - - mfansler From cb9b4328c26253eb3717dcf67b0007e1c06933d4 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Mon, 20 Nov 2023 23:45:41 -0500 Subject: [PATCH 10/10] de-linting --- recipes/conda-create-no-user-site/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/conda-create-no-user-site/meta.yaml b/recipes/conda-create-no-user-site/meta.yaml index 1a16ba65d2724..6402d185ba236 100644 --- a/recipes/conda-create-no-user-site/meta.yaml +++ b/recipes/conda-create-no-user-site/meta.yaml @@ -13,8 +13,10 @@ requirements: host: - python - pip + run: + - python run_constrained: - - python>=3.3 + - python >=3.3 test: requires: