From 7133dfe68572ea905b116e27dda5c22ad8030302 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: May 20 2022 02:13:37 +0000 Subject: local build --- diff --git a/0001-Fix-toolz-imports.patch b/0001-Fix-toolz-imports.patch index 5cfdd27..50acbf0 100644 --- a/0001-Fix-toolz-imports.patch +++ b/0001-Fix-toolz-imports.patch @@ -1,8 +1,8 @@ diff --git a/conda/plan.py b/conda/plan.py -index e00da72..076dcf1 100644 +index a0dc0bb..9f757e5 100644 --- a/conda/plan.py +++ b/conda/plan.py -@@ -371,7 +371,7 @@ def _plan_from_actions(actions, index): # pragma: no cover +@@ -370,7 +370,7 @@ def _plan_from_actions(actions, index): # pragma: no cover def _inject_UNLINKLINKTRANSACTION(plan, index, prefix, axn, specs): # pragma: no cover from os.path import isdir from .models.dist import Dist @@ -12,11 +12,11 @@ index e00da72..076dcf1 100644 from .core.package_cache_data import ProgressiveFetchExtract from .core.link import PrefixSetup, UnlinkLinkTransaction diff --git a/conda_env/env.py b/conda_env/env.py -index 1838335..e88da34 100644 +index b10043e..25815ec 100644 --- a/conda_env/env.py +++ b/conda_env/env.py -@@ -22,10 +22,7 @@ from conda.models.prefix_graph import PrefixGraph - from . import compat, exceptions +@@ -22,10 +22,7 @@ from conda.models.match_spec import MatchSpec + from conda.models.prefix_graph import PrefixGraph from conda.history import History -try: @@ -28,7 +28,7 @@ index 1838335..e88da34 100644 VALID_KEYS = ('name', 'dependencies', 'prefix', 'channels', 'variables') diff --git a/tests/base/test_context.py b/tests/base/test_context.py -index c643648..320a709 100644 +index db5c3f4..391abbc 100644 --- a/tests/base/test_context.py +++ b/tests/base/test_context.py @@ -14,7 +14,7 @@ import pytest @@ -39,22 +39,22 @@ index c643648..320a709 100644 +from conda._vendor.toolz import concat from conda.base.constants import PathConflict, ChannelPriority from conda.base.context import context, reset_context, conda_tests_ctxt_mgmt_def_pol - from conda.common.compat import odict, iteritems + from conda.common.compat import odict diff --git a/tests/core/test_path_actions.py b/tests/core/test_path_actions.py -index b5514c1..0432e65 100644 +index 5c6b283..7cffdd6 100644 --- a/tests/core/test_path_actions.py +++ b/tests/core/test_path_actions.py -@@ -14,7 +14,7 @@ from uuid import uuid4 +@@ -16,7 +16,7 @@ from uuid import uuid4 import pytest from conda.auxlib.collection import AttrDict -from conda._vendor.toolz.itertoolz import groupby +from conda._vendor.toolz import groupby from conda.base.context import context - from conda.common.compat import PY2, on_win + from conda.common.compat import on_win from conda.common.path import get_bin_directory_short_path, get_python_noarch_target_path, \ diff --git a/tests/test_activate.py b/tests/test_activate.py -index 75a617f..46123d0 100644 +index 6c86469..c90282f 100644 --- a/tests/test_activate.py +++ b/tests/test_activate.py @@ -21,7 +21,7 @@ import pytest @@ -63,11 +63,11 @@ index 75a617f..46123d0 100644 from conda.auxlib.ish import dals -from conda._vendor.toolz.itertoolz import concatv +from conda._vendor.toolz import concatv - from conda.activate import CmdExeActivator, CshActivator, FishActivator, PosixActivator, \ - PowerShellActivator, XonshActivator, activator_map, _build_activator_cls, \ - main as activate_main, native_path_to_unix + from conda.activate import ( + CmdExeActivator, + CshActivator, diff --git a/tests/test_create.py b/tests/test_create.py -index 9e8db8b..c6ad669 100644 +index 952d38d..7888f33 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera @@ -77,5 +77,5 @@ index 9e8db8b..c6ad669 100644 -from conda._vendor.toolz.itertoolz import groupby +from conda._vendor.toolz import groupby from conda.gateways.disk.permissions import make_read_only + from conda.gateways.disk.create import compile_multiple_pyc from conda.models.channel import Channel - from conda.resolve import Resolve diff --git a/0003-Drop-fs-path-encoding-manipulation-under-python2.patch b/0003-Drop-fs-path-encoding-manipulation-under-python2.patch deleted file mode 100644 index b588744..0000000 --- a/0003-Drop-fs-path-encoding-manipulation-under-python2.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 1f21cf4dd33e4d62f3dca93294bfa5508a2591ab -Author: rpm-build -Date: Sat Mar 30 20:59:05 2019 -0600 - - [PATCH] Drop fs path encoding manipulation under python2 - -diff --git a/conda/activate.py b/conda/activate.py -index e515c0e..3632a61 100644 ---- a/conda/activate.py -+++ b/conda/activate.py -@@ -63,11 +63,7 @@ class _Activator(object): - def __init__(self, arguments=None): - self._raw_arguments = arguments - -- if PY2: -- self.environ = {ensure_fs_path_encoding(k): ensure_fs_path_encoding(v) -- for k, v in iteritems(os.environ)} -- else: -- self.environ = os.environ.copy() -+ self.environ = os.environ.copy() - - # Once Python2 dies odargs can become kwargs again since dicts are ordered since 3.6. - def get_export_unset_vars(self, odargs): diff --git a/conda-conda-build.patch b/conda-conda-build.patch index aab8f57..cc1a85c 100644 --- a/conda-conda-build.patch +++ b/conda-conda-build.patch @@ -1,17 +1,29 @@ -diff -up conda-4.12.0/tests/conftest.py.conda-build conda-4.12.0/tests/conftest.py ---- conda-4.12.0/tests/conftest.py.conda-build 2022-03-08 07:25:18.000000000 -0700 -+++ conda-4.12.0/tests/conftest.py 2022-03-08 20:39:51.334937572 -0700 -@@ -27,13 +27,3 @@ def pytest_addoption(parser): - def pytest_generate_tests(metafunc): - if 'shell' in metafunc.fixturenames: - metafunc.parametrize("shell", metafunc.config.option.shell) +diff --git a/tests/conftest.py b/tests/conftest.py +index a6f1ab6..f7776b4 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -7,24 +7,6 @@ import subprocess + import pytest + + +-def _conda_build_recipe(recipe): +- subprocess.run( +- ["conda-build", str(Path(__file__).resolve().parent / "test-recipes" / recipe)], +- check=True, +- ) +- return recipe - - --@pytest.fixture(scope="session", autouse=True) --def conda_build_recipes(): -- test_recipes = Path(__file__).resolve().parent / "test-recipes" -- recipes_to_build = ["activate_deactivate_package", "pre_link_messages_package"] -- packages = [str(test_recipes / pkg) for pkg in recipes_to_build] -- cmd = ["conda-build"] -- cmd.extend(packages) -- subprocess.run(cmd, check=True) +-@pytest.fixture(scope="session") +-def activate_deactivate_package(): +- return _conda_build_recipe("activate_deactivate_package") +- +- +-@pytest.fixture(scope="session") +-def pre_link_messages_package(): +- return _conda_build_recipe("pre_link_messages_package") +- +- + @pytest.fixture + def clear_cache(): + from conda.core.subdir_data import SubdirData diff --git a/conda.spec b/conda.spec index 5283e0a..d4ff9bc 100644 --- a/conda.spec +++ b/conda.spec @@ -1,7 +1,7 @@ %bcond_without tests Name: conda -Version: 4.12.0 +Version: 4.13.0 Release: %autorelease Summary: Cross-platform, Python-agnostic binary package manager @@ -28,7 +28,6 @@ Patch4: conda-32bit.patch Patch5: conda-mock.patch Patch10001: 0001-Fix-toolz-imports.patch -Patch10003: 0003-Drop-fs-path-encoding-manipulation-under-python2.patch Patch10004: 0004-Do-not-try-to-run-usr-bin-python.patch Patch10005: 0005-Fix-failing-tests-in-test_api.py.patch Patch10006: 0006-shell-assume-shell-plugins-are-in-etc.patch @@ -122,7 +121,7 @@ sed -i -e '/xdoctest/d' setup.cfg sed -r -i '1 {/#![/]usr[/]bin[/]env/d}' conda/_vendor/appdirs.py # Use Fedora's cpuinfo since it supports more arches -rm conda/_vendor/cpuinfo.py +rm -r conda/_vendor/cpuinfo # Replaced by cytools, byte compilation fails under python3.7 %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -135,7 +134,7 @@ rm conda/_vendor/toolz/[a-zA-Z]* # TODO - urllib3 - results in test failures: https://github.com/conda/conda/issues/9512 #rm -r conda/_vendor/{distro.py,frozendict.py,tqdm,urllib3} #find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\|urllib3\).*\) import/\1from \2 import/' -rm -r conda/_vendor/{distro.py,frozendict.py,tqdm} +rm -r conda/_vendor/{distro.py,frozendict,tqdm} find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\).*\) import/\1from \2 import/' %ifnarch x86_64 @@ -197,6 +196,7 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} conda info # test_ProgressiveFetchExtract_prefers_conda_v2_format, test_subdir_data_prefers_conda_to_tar_bz2, # test_use_only_tar_bz2 fail in F31 koji, but not with mock --enablerepo=local. Let's disable # them for now. +# tests/cli/test_main_clean.py tests require network access # tests/core/test_initialize.py tries to unlink /usr/bin/python3 and fails when python is a release candidate # tests/core/test_solve.py::test_cuda_fail_1 fails on non-x86_64 py.test-%{python3_version} -vv -m "not integration" \ @@ -206,6 +206,7 @@ py.test-%{python3_version} -vv -m "not integration" \ --deselect=tests/test_cli.py::test_run_returns_nonzero_errorlevel \ --deselect=tests/test_cli.py::test_run_returns_zero_errorlevel \ --deselect=tests/test_cli.py::test_run_readonly_env \ + --deselect=tests/cli/test_main_clean.py \ --deselect=tests/core/test_package_cache_data.py::test_ProgressiveFetchExtract_prefers_conda_v2_format \ --deselect=tests/core/test_subdir_data.py::test_subdir_data_prefers_conda_to_tar_bz2 \ --deselect=tests/core/test_subdir_data.py::test_use_only_tar_bz2 \ @@ -230,7 +231,6 @@ py.test-%{python3_version} -vv -m "not integration" \ %{python3_sitelib}/conda/ %{python3_sitelib}/conda_env/ %{python3_sitelib}/*.egg-info -%exclude %{python3_sitelib}/test_data/ %{_localstatedir}/cache/conda/ %{_datadir}/conda/ diff --git a/sources b/sources index 2d70f13..6d1d093 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (conda-4.12.0.tar.gz) = b8b51758a3edb80d0db72d404226a959ca3e6224ce23d2f46e5246537c6461f9ef1801b92901995e52dadef5015c3aa42019433b6f61058e40777b29d203b7cc +SHA512 (conda-4.13.0.tar.gz) = be2b5ea639332ac5bb1b7d92a9af854ccc657d1a64b1eb5c31c50f5d86b954e0d454db1746771a6549e6c7111f827bcd2e6f30e77fc3b0cd10e3c96e258a3abd