From 40c87d87b8a91bc004a13e7f2c0ffdcb2a9d24b7 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 15 Dec 2019 20:19:19 -0700 Subject: [PATCH 1/2] Update 4.6.14 Make "conda shell.bash hook" work (bz#1737165) Use system py-cpuinfo Unbundle more libraries --- conda-cpuinfo.patch | 12 ++++ conda.spec | 149 ++++++++++++++++---------------------------- 2 files changed, 64 insertions(+), 97 deletions(-) create mode 100644 conda-cpuinfo.patch diff --git a/conda-cpuinfo.patch b/conda-cpuinfo.patch new file mode 100644 index 0000000..506333b --- /dev/null +++ b/conda-cpuinfo.patch @@ -0,0 +1,12 @@ +diff -up conda-4.7.11/conda/base/context.py.cpuinfo conda-4.7.11/conda/base/context.py +--- conda-4.7.11/conda/base/context.py.cpuinfo 2019-08-06 13:23:55.000000000 -0600 ++++ conda-4.7.11/conda/base/context.py 2019-08-16 21:31:01.947610667 -0600 +@@ -1328,7 +1328,7 @@ conda_tests_ctxt_mgmt_def_pol = replace_ + @memoize + def _get_cpu_info(): + # DANGER: This is rather slow +- from .._vendor.cpuinfo import get_cpu_info ++ from cpuinfo import get_cpu_info + return frozendict(get_cpu_info()) + + diff --git a/conda.spec b/conda.spec index 443436a..6cc1002 100644 --- a/conda.spec +++ b/conda.spec @@ -1,8 +1,7 @@ %{!?_with_bootstrap: %global bootstrap 0} -%global with_python2 0%{?fedora} && 0%{?fedora} < 30 Name: conda -Version: 4.6.13 +Version: 4.6.14 Release: 1%{?dist} Summary: Cross-platform, Python-agnostic binary package manager @@ -19,6 +18,8 @@ Patch0: conda_sys_prefix.patch Patch1: conda_gateways_disk_create.patch Patch2: setup.patch Patch3: conda-tests.patch +# Use system cpuinfo +Patch4: conda-cpuinfo.patch Patch10001: 0001-Fix-toolz-imports.patch Patch10002: 0002-Adjust-ruamel.yaml-imports.patch @@ -30,10 +31,11 @@ BuildArch: noarch Requires: python%{python3_pkgversion}-conda = %{version}-%{release} # Removed upstream in favour of calling "conda activate" in version 4.4.0 -Obsoletes: conda-activate < 4.4 +Obsoletes: conda-activate < 4.4 %?python_enable_dependency_generator +BuildRequires: /usr/bin/pathfix.py BuildRequires: sed %global _description \ @@ -45,61 +47,16 @@ entirely in Python. %description %_description -%global _py2_reqs \ - python2-crypto \ - python2-pycosat >= 0.6.3 \ - python2-ruamel-yaml \ - python2-mock \ - python2-responses - -%global _py2_bund \ - bundled(python2-appdirs) = 1.2.0 \ - bundled(python2-auxlib) \ - bundled(python2-boltons) = 16.5.1 \ - bundled(python2-six) = 1.10.0 \ - bundled(python2-toolz) = 0.8.2 \ - bundled(python2-urllib3) = 1.19.1 - -%global py2_reqs %(c="%_py2_reqs"; echo "$c" | xargs) -%global py3_reqs %(c="%_py2_reqs"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs) - -%global py2_bund %(c="%_py2_bund"; echo "$c" | xargs) -%global py3_bund %(c="%_py2_bund"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs) - -%if %with_python2 -%package -n python2-conda -Summary: %{summary} - -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: %py2_reqs -BuildRequires: python2-requests -# When this is present, vendored toolz should not be used -%if 0%{?fedora} -# EPEL does not have new enough cytoolz -BuildRequires: python2-cytoolz -%endif -# For tests -BuildRequires: python2-enum34 -BuildRequires: python2-futures -BuildRequires: python2-pytest-cov - -# Keep manual Requires for now: -# automatically generated Requires are missing a few modules. -# Having both is still useful because the automatic ones have -# version requirements. -Requires: %py2_reqs -Requires: python2-enum34 -Requires: python2-futures -%if 0%{?fedora} -# EPEL does not have new enough cytoolz -Requires: python2-cytoolz -%endif -Provides: %py2_bund -%{?python_provide:%python_provide python2-conda} - -%description -n python2-conda %_description -%endif +%global _py3_reqs \ + python%{python3_pkgversion}-cpuinfo \ + python%{python3_pkgversion}-crypto \ + python%{python3_pkgversion}-distro >= 1.0.4 \ + python%{python3_pkgversion}-frozendict >= 1.2 \ + python%{python3_pkgversion}-pycosat >= 0.6.3 \ + python%{python3_pkgversion}-requests \ + python%{python3_pkgversion}-ruamel-yaml \ + python%{python3_pkgversion}-tqdm >= 4.22.0 +%global py3_reqs %(c="%_py3_reqs"; echo "$c" | xargs) %package -n python%{python3_pkgversion}-conda Summary: %{summary} @@ -107,24 +64,30 @@ Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: %py3_reqs -BuildRequires: python%{python3_pkgversion}-requests BuildRequires: python%{python3_pkgversion}-yaml # When this is present, vendored toolz should not be used -%if 0%{?fedora} -# EPEL does not have new enough cytoolz +%if 0%{?fedora} || 0%{?rhel} >= 8 +# EPEL7 does not have new enough cytoolz BuildRequires: python%{python3_pkgversion}-cytoolz >= 0.8.2 %endif # For tests +BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-pytest-cov +BuildRequires: python%{python3_pkgversion}-responses Requires: %py3_reqs -Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-yaml -%if 0%{?fedora} -# EPEL does not have new enough cytoolz +%if 0%{?fedora} || 0%{?rhel} >= 8 +# EPEL7 does not have new enough cytoolz Requires: python%{python3_pkgversion}-cytoolz >= 0.8.2 %endif -Provides: %py3_bund +Provides: bundled(python%{python3_pkgversion}-appdirs) = 1.2.0 +Provides: bundled(python%{python3_pkgversion}-auxlib) +Provides: bundled(python%{python3_pkgversion}-boltons) = 16.5.1 +Provides: bundled(python%{python3_pkgversion}-six) = 1.10.0 +Provides: bundled(python%{python3_pkgversion}-toolz) = 0.8.2 +Provides: bundled(python%{python3_pkgversion}-urllib3) = 1.19.1 + %{?python_provide:%python_provide python%{python3_pkgversion}-conda} %description -n python%{python3_pkgversion}-conda %_description @@ -146,35 +109,30 @@ sed -r -i 's/\btest_list\b/_disabled_\0/' tests/test_cli.py # or so. 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 + # Replaced by cytools, byte compilation fails under python3.7 -%if 0%{?fedora} -# EPEL does not have new enough cytoolz +%if 0%{?fedora} || 0%{?rhel} >= 8 +# EPEL7 does not have new enough cytoolz # We need to keep __init__.py which does the dispatch between vendored and non-vendored rm conda/_vendor/toolz/[a-zA-Z]* %endif +# Use system versions +rm -r conda/_vendor/{distro.py,frozendict.py,tqdm} +find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\).*\) import/\1from \2 import/' + + %build # build conda executable %define py_setup utils/setup-testing.py -%if %with_python2 -%py2_build -%endif %py3_build %install # install conda executable %define py_setup utils/setup-testing.py -%if 0%{?fedora} -%if %with_python2 -%py2_install -%endif %py3_install -%else -%py3_install -%if %with_python2 -%py2_install -%endif -%endif mkdir -p %{buildroot}%{_datadir}/conda/condarc.d cat >%{buildroot}%{_datadir}/conda/condarc.d/defaults.yaml < - 4.6.14-1 +- Update 4.6.14 +- Make "conda shell.bash hook" work (bz#1737165) +- Use system py-cpuinfo +- Unbundle more libraries + * Tue Apr 16 2019 Orion Poplawski - 4.6.13-1 - Update to 4.6.13 From fe4f3921b7f09c4bf46bac0449281facf07f4cb4 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 15 Dec 2019 20:22:22 -0700 Subject: [PATCH 2/2] Upload source --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index d7e13c0..9c0ebc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (conda-4.6.13.tar.gz) = 8f0ad3cac26e88740ffc94f980546827388151746d8fad133b131dc893d8bb4a2840fb4f08e6c98759b1d919e8d24b05c93acd76bfc16ae5d487f699ea5ce20d +SHA512 (conda-4.6.14.tar.gz) = 046faac0f82e3cd2f417725fe6074ccc561e126c0af11a3a46a3f32f7a535d11d3d337fbdc1f5a61ca8dc2235f6421ac8425b1a7aa7ce326cb9e2e6c18ce5a10