Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe4f3921b7 | ||
|
|
40c87d87b8 |
3 changed files with 65 additions and 98 deletions
12
conda-cpuinfo.patch
Normal file
12
conda-cpuinfo.patch
Normal file
|
|
@ -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())
|
||||
|
||||
|
||||
149
conda.spec
149
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 <<EOF
|
||||
|
|
@ -192,6 +150,14 @@ sed -r -i '1i CONDA_EXE=%{_bindir}/conda' %{buildroot}/etc/profile.d/conda.sh
|
|||
sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \
|
||||
-e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh
|
||||
|
||||
# install the scripts
|
||||
mkdir -p %{buildroot}%{python3_sitelib}/conda/shell
|
||||
cp -rp conda/shell/{bin,etc} %{buildroot}%{python3_sitelib}/conda/shell/
|
||||
|
||||
# fix shebangs
|
||||
pathfix.py -i %{__python3} -pn %{name} %{buildroot}%{python3_sitelib}/conda/shell/bin/conda
|
||||
|
||||
|
||||
%check
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
|
||||
|
|
@ -202,11 +168,6 @@ py.test-%{python3_version} -vv -m "not integration" \
|
|||
-k 'not test_create_advanced_pip' \
|
||||
--ignore tests/core/test_initialize.py %{?el7:|| :}
|
||||
|
||||
%if %with_python2
|
||||
# Run python2 tests later, since they are more likely to fail stupidly.
|
||||
# Some tests fail because py2 does not default to utf-8.
|
||||
py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_bindir}/conda
|
||||
|
|
@ -214,18 +175,6 @@ py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
|||
/etc/profile.d/conda.sh
|
||||
/etc/profile.d/conda.csh
|
||||
|
||||
%if %with_python2
|
||||
%files -n python2-conda
|
||||
%license LICENSE.txt
|
||||
%doc CHANGELOG.md README.rst
|
||||
%{python2_sitelib}/conda/
|
||||
%{python2_sitelib}/conda_env/
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%exclude %{python2_sitelib}/test_data/
|
||||
%{_localstatedir}/cache/conda/
|
||||
%{_datadir}/conda/
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-conda
|
||||
%license LICENSE.txt
|
||||
%doc CHANGELOG.md README.rst
|
||||
|
|
@ -238,6 +187,12 @@ py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Dec 15 2019 Orion Poplawski <orion@nwra.com> - 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 <orion@nwra.com> - 4.6.13-1
|
||||
- Update to 4.6.13
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (conda-4.6.13.tar.gz) = 8f0ad3cac26e88740ffc94f980546827388151746d8fad133b131dc893d8bb4a2840fb4f08e6c98759b1d919e8d24b05c93acd76bfc16ae5d487f699ea5ce20d
|
||||
SHA512 (conda-4.6.14.tar.gz) = 046faac0f82e3cd2f417725fe6074ccc561e126c0af11a3a46a3f32f7a535d11d3d337fbdc1f5a61ca8dc2235f6421ac8425b1a7aa7ce326cb9e2e6c18ce5a10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue