|
|
4020096 |
%bcond_without tests
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
Name: conda
|
|
|
7133dfe |
Version: 4.13.0
|
|
|
33ff6c7 |
Release: %autorelease
|
|
|
fd1b9f9 |
Summary: Cross-platform, Python-agnostic binary package manager
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
License: BSD and ASL 2.0 and LGPLv2+ and MIT
|
|
|
fd1b9f9 |
# The conda code is BSD
|
|
|
fd1b9f9 |
# progressbar is LGPLv2+
|
|
|
fd1b9f9 |
# six is MIT/X11
|
|
|
fd1b9f9 |
# adapters/ftp.py is ASL 2.0
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
URL: http://conda.pydata.org/docs/
|
|
|
fd1b9f9 |
Source0: https://github.com/conda/conda/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
7850a7c |
# bash completion script moved to a separate project
|
|
|
7850a7c |
Source1: https://raw.githubusercontent.com/tartansandal/conda-bash-completion/1.5/conda
|
|
|
fd1b9f9 |
Patch0: conda_sys_prefix.patch
|
|
|
2785a51 |
Patch1: conda_gateways_disk_create.patch
|
|
|
a4af2ad |
# Do not test with conda-build
|
|
|
a4af2ad |
Patch2: conda-conda-build.patch
|
|
|
8bac080 |
# Use system cpuinfo
|
|
|
8bac080 |
Patch3: conda-cpuinfo.patch
|
|
|
f8c51ee |
# Fix tests on 32bit
|
|
|
f8c51ee |
# https://github.com/conda/conda/pull/9759
|
|
|
f8c51ee |
Patch4: conda-32bit.patch
|
|
|
bfeb5e5 |
# Fix mock import
|
|
|
bfeb5e5 |
Patch5: conda-mock.patch
|
|
|
4723304 |
|
|
|
da2616f |
Patch10001: 0001-Fix-toolz-imports.patch
|
|
|
da2616f |
Patch10004: 0004-Do-not-try-to-run-usr-bin-python.patch
|
|
|
da2616f |
Patch10005: 0005-Fix-failing-tests-in-test_api.py.patch
|
|
|
fd9a929 |
Patch10006: 0006-shell-assume-shell-plugins-are-in-etc.patch
|
|
|
d8bc1af |
Patch10007: 0001-Add-back-conda-and-conda_env-entry-point.patch
|
|
|
d8bc1af |
Patch10008: 0002-Go-back-to-ruamel_yaml.patch
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
BuildArch: noarch
|
|
|
fd1b9f9 |
|
|
|
7850a7c |
BuildRequires: pkgconfig(bash-completion)
|
|
|
7850a7c |
%global bash_completionsdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo '/etc/bash_completion.d')
|
|
|
7850a7c |
BuildRequires: sed
|
|
|
7850a7c |
|
|
|
951dfa8 |
Requires: python%{python3_pkgversion}-conda = %{version}-%{release}
|
|
|
2785a51 |
# Removed upstream in favour of calling "conda activate" in version 4.4.0
|
|
|
999f1f9 |
Obsoletes: conda-activate < 4.4
|
|
|
fd1b9f9 |
|
|
|
fb7115f |
%?python_enable_dependency_generator
|
|
|
fb7115f |
|
|
|
fd1b9f9 |
|
|
|
eddb4eb |
%global _description %{expand:
|
|
|
eddb4eb |
Conda is a cross-platform, Python-agnostic binary package manager. It
|
|
|
eddb4eb |
is the package manager used by Anaconda installations, but it may be
|
|
|
eddb4eb |
used for other systems as well. Conda makes environments first-class
|
|
|
eddb4eb |
citizens, making it easy to create independent environments even for
|
|
|
ca61462 |
C libraries. Conda is written entirely in Python.
|
|
|
ca61462 |
|
|
|
ca61462 |
The Fedora conda base environment is special. Unlike a standard
|
|
|
ca61462 |
anaconda install base environment it is essentially read-only. You
|
|
|
ca61462 |
can only use conda to create and manage new environments.}
|
|
|
ca61462 |
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%description %_description
|
|
|
fd1b9f9 |
|
|
|
999f1f9 |
%global _py3_reqs \
|
|
|
999f1f9 |
python%{python3_pkgversion}-cpuinfo \
|
|
|
999f1f9 |
python%{python3_pkgversion}-conda-package-handling >= 1.3.0 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-distro >= 1.0.4 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-frozendict >= 1.2 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-pycosat >= 0.6.3 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-pyOpenSSL >= 16.2.0 \
|
|
|
d8bc1af |
python%{python3_pkgversion}-pyyaml \
|
|
|
999f1f9 |
python%{python3_pkgversion}-requests >= 2.18.4 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-ruamel-yaml >= 0.11.14 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-tqdm >= 4.22.0 \
|
|
|
999f1f9 |
python%{python3_pkgversion}-urllib3 >= 1.19.1
|
|
|
999f1f9 |
%global py3_reqs %(c="%_py3_reqs"; echo "$c" | xargs)
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%package -n python%{python3_pkgversion}-conda
|
|
|
fd1b9f9 |
Summary: %{summary}
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
fd1b9f9 |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
fd1b9f9 |
BuildRequires: %py3_reqs
|
|
|
4723304 |
# When this is present, vendored toolz should not be used
|
|
|
999f1f9 |
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
|
999f1f9 |
# EPEL7 does not have new enough cytoolz
|
|
|
da2616f |
BuildRequires: python%{python3_pkgversion}-cytoolz >= 0.8.2
|
|
|
951dfa8 |
%endif
|
|
|
fd1b9f9 |
# For tests
|
|
|
6442fbd |
BuildRequires: python-unversioned-command
|
|
|
3308381 |
BuildRequires: python%{python3_pkgversion}-pytest-rerunfailures
|
|
|
d8bc1af |
BuildRequires: python%{python3_pkgversion}-pytest-timeout
|
|
|
999f1f9 |
BuildRequires: python%{python3_pkgversion}-responses
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
Requires: %py3_reqs
|
|
|
999f1f9 |
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
|
951dfa8 |
# EPEL does not have new enough cytoolz
|
|
|
da2616f |
Requires: python%{python3_pkgversion}-cytoolz >= 0.8.2
|
|
|
951dfa8 |
%endif
|
|
|
999f1f9 |
Provides: bundled(python%{python3_pkgversion}-appdirs) = 1.2.0
|
|
|
999f1f9 |
Provides: bundled(python%{python3_pkgversion}-auxlib)
|
|
|
999f1f9 |
Provides: bundled(python%{python3_pkgversion}-boltons) = 18.0.0
|
|
|
999f1f9 |
Provides: bundled(python%{python3_pkgversion}-six) = 1.10.0
|
|
|
999f1f9 |
Provides: bundled(python%{python3_pkgversion}-toolz) = 0.8.2
|
|
|
999f1f9 |
|
|
|
fd1b9f9 |
%{?python_provide:%python_provide python%{python3_pkgversion}-conda}
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%description -n python%{python3_pkgversion}-conda %_description
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%prep
|
|
|
fd1b9f9 |
%autosetup -p1
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
sed -r -i 's/^(__version__ = ).*/\1"%{version}"/' conda/__init__.py
|
|
|
3308381 |
# xdoctest not packaged
|
|
|
3308381 |
sed -i -e '/xdoctest/d' setup.cfg
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
# delete interpreter line, the user can always call the file
|
|
|
fd1b9f9 |
# explicitly as python3 /usr/lib/python3.6/site-packages/conda/_vendor/appdirs.py
|
|
|
fd1b9f9 |
# or so.
|
|
|
fd1b9f9 |
sed -r -i '1 {/#![/]usr[/]bin[/]env/d}' conda/_vendor/appdirs.py
|
|
|
fd1b9f9 |
|
|
|
8bac080 |
# Use Fedora's cpuinfo since it supports more arches
|
|
|
7133dfe |
rm -r conda/_vendor/cpuinfo
|
|
|
8bac080 |
|
|
|
4723304 |
# Replaced by cytools, byte compilation fails under python3.7
|
|
|
999f1f9 |
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
|
951dfa8 |
# EPEL does not have new enough cytoolz
|
|
|
da2616f |
# We need to keep __init__.py which does the dispatch between vendored and non-vendored
|
|
|
da2616f |
rm conda/_vendor/toolz/[a-zA-Z]*
|
|
|
951dfa8 |
%endif
|
|
|
4723304 |
|
|
|
999f1f9 |
# Use system versions
|
|
|
999f1f9 |
# TODO - urllib3 - results in test failures: https://github.com/conda/conda/issues/9512
|
|
|
999f1f9 |
#rm -r conda/_vendor/{distro.py,frozendict.py,tqdm,urllib3}
|
|
|
999f1f9 |
#find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\|urllib3\).*\) import/\1from \2 import/'
|
|
|
7133dfe |
rm -r conda/_vendor/{distro.py,frozendict,tqdm}
|
|
|
999f1f9 |
find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\).*\) import/\1from \2 import/'
|
|
|
999f1f9 |
|
|
|
40ac1af |
%ifnarch x86_64
|
|
|
b31022a |
# Tests on 32-bit
|
|
|
b31022a |
cp -a tests/data/conda_format_repo/linux-{64,32}
|
|
|
b31022a |
sed -i -e s/linux-64/linux-32/ tests/data/conda_format_repo/linux-32/*json
|
|
|
5950abb |
# Tests on non-x86_64
|
|
|
40ac1af |
cp -a tests/data/conda_format_repo/{linux-64,%{python3_platform}}
|
|
|
40ac1af |
sed -i -e s/linux-64/%{python3_platform}/ tests/data/conda_format_repo/%{python3_platform}/*json
|
|
|
40ac1af |
%endif
|
|
|
b31022a |
|
|
|
bfeb5e5 |
# do not run coverage in pytest
|
|
|
bfeb5e5 |
sed -i -E '/--(no-)?cov/d' setup.cfg
|
|
|
bfeb5e5 |
|
|
|
999f1f9 |
|
|
|
fd1b9f9 |
%build
|
|
|
2785a51 |
# build conda executable
|
|
|
fd1b9f9 |
%py3_build
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%install
|
|
|
2785a51 |
# install conda executable
|
|
|
fd1b9f9 |
%py3_install
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
mkdir -p %{buildroot}%{_datadir}/conda/condarc.d
|
|
|
fd1b9f9 |
cat >%{buildroot}%{_datadir}/conda/condarc.d/defaults.yaml <
|
|
|
fd1b9f9 |
pkgs_dirs:
|
|
|
fd1b9f9 |
- /var/cache/conda/pkgs
|
|
|
fd1b9f9 |
- ~/.conda/pkgs
|
|
|
fd1b9f9 |
EOF
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
mkdir -p %{buildroot}%{_localstatedir}/cache/conda/pkgs/cache
|
|
|
fd1b9f9 |
|
|
|
951dfa8 |
# install does not create the directory on EL7
|
|
|
7463660 |
install -m 0644 -Dt %{buildroot}/etc/profile.d/ conda/shell/etc/profile.d/conda.{sh,csh}
|
|
|
7463660 |
sed -r -i '1i CONDA_EXE=%{_bindir}/conda' %{buildroot}/etc/profile.d/conda.sh
|
|
|
7463660 |
sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \
|
|
|
7463660 |
-e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh
|
|
|
4b76b76 |
install -m 0644 -Dt %{buildroot}/etc/fish/conf.d/ conda/shell/etc/fish/conf.d/conda.fish
|
|
|
4b76b76 |
sed -r -i -e '1i set -gx CONDA_EXE "/usr/bin/conda"\nset _CONDA_ROOT "/usr"\nset _CONDA_EXE "/usr/bin/conda"\nset -gx CONDA_PYTHON_EXE "/usr/bin/python3"' \
|
|
|
4b76b76 |
%{buildroot}/etc/fish/conf.d/conda.fish
|
|
|
2785a51 |
|
|
|
7850a7c |
# Install bash completion script
|
|
|
7850a7c |
install -m 0644 -Dt %{buildroot}%{bash_completionsdir}/ %SOURCE1
|
|
|
999f1f9 |
|
|
|
999f1f9 |
|
|
|
fd1b9f9 |
%check
|
|
|
4020096 |
%if %{with tests}
|
|
|
fd1b9f9 |
export PATH=%{buildroot}%{_bindir}:$PATH
|
|
|
40ac1af |
PYTHONPATH=%{buildroot}%{python3_sitelib} conda info
|
|
|
2785a51 |
|
|
|
2785a51 |
# Integration tests generally require network, so skip them.
|
|
|
117bbaa |
|
|
|
117bbaa |
# TestJson.test_list does not recognize /usr as a conda environment
|
|
|
117bbaa |
# These fail on koji with PackageNotFound errors likely due to network issues
|
|
|
117bbaa |
# test_cli.py::TestRun.test_run_returns_int
|
|
|
117bbaa |
# test_cli.py::TestRun.test_run_returns_nonzero_errorlevel
|
|
|
117bbaa |
# test_cli.py::TestRun.test_run_returns_zero_errorlevel
|
|
|
117bbaa |
|
|
|
fb5c7ae |
# test_ProgressiveFetchExtract_prefers_conda_v2_format, test_subdir_data_prefers_conda_to_tar_bz2,
|
|
|
fb5c7ae |
# test_use_only_tar_bz2 fail in F31 koji, but not with mock --enablerepo=local. Let's disable
|
|
|
fb5c7ae |
# them for now.
|
|
|
7133dfe |
# tests/cli/test_main_clean.py tests require network access
|
|
|
117bbaa |
# tests/core/test_initialize.py tries to unlink /usr/bin/python3 and fails when python is a release candidate
|
|
|
117bbaa |
# tests/core/test_solve.py::test_cuda_fail_1 fails on non-x86_64
|
|
|
da2616f |
py.test-%{python3_version} -vv -m "not integration" \
|
|
|
3308381 |
--ignore conda/auxlib/_vendor \
|
|
|
117bbaa |
--deselect=tests/test_cli.py::TestJson::test_list \
|
|
|
a4af2ad |
--deselect=tests/test_cli.py::test_run_returns_int \
|
|
|
a4af2ad |
--deselect=tests/test_cli.py::test_run_returns_nonzero_errorlevel \
|
|
|
a4af2ad |
--deselect=tests/test_cli.py::test_run_returns_zero_errorlevel \
|
|
|
a4af2ad |
--deselect=tests/test_cli.py::test_run_readonly_env \
|
|
|
7133dfe |
--deselect=tests/cli/test_main_clean.py \
|
|
|
999f1f9 |
--deselect=tests/core/test_package_cache_data.py::test_ProgressiveFetchExtract_prefers_conda_v2_format \
|
|
|
117bbaa |
--deselect=tests/core/test_subdir_data.py::test_subdir_data_prefers_conda_to_tar_bz2 \
|
|
|
c0d92a1 |
--deselect=tests/core/test_subdir_data.py::test_use_only_tar_bz2 \
|
|
|
117bbaa |
--deselect=tests/core/test_initialize.py \
|
|
|
117bbaa |
--deselect=tests/core/test_solve.py::test_cuda_fail_1
|
|
|
4020096 |
%endif
|
|
|
2785a51 |
|
|
|
fd1b9f9 |
%files
|
|
|
fd1b9f9 |
%{_bindir}/conda
|
|
|
fd1b9f9 |
%{_bindir}/conda-env
|
|
|
7850a7c |
%{bash_completionsdir}/conda
|
|
|
4b76b76 |
# TODO - better ownership/requires for fish
|
|
|
4b76b76 |
%dir /etc/fish
|
|
|
4b76b76 |
%dir /etc/fish/conf.d
|
|
|
4b76b76 |
/etc/fish/conf.d/conda.fish
|
|
|
2785a51 |
/etc/profile.d/conda.sh
|
|
|
2785a51 |
/etc/profile.d/conda.csh
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%files -n python%{python3_pkgversion}-conda
|
|
|
fd1b9f9 |
%license LICENSE.txt
|
|
|
fd1b9f9 |
%doc CHANGELOG.md README.rst
|
|
|
fd1b9f9 |
%{python3_sitelib}/conda/
|
|
|
fd1b9f9 |
%{python3_sitelib}/conda_env/
|
|
|
fd1b9f9 |
%{python3_sitelib}/*.egg-info
|
|
|
fd1b9f9 |
%{_localstatedir}/cache/conda/
|
|
|
fd1b9f9 |
%{_datadir}/conda/
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
|
|
|
fd1b9f9 |
%changelog
|
|
|
33ff6c7 |
%autochangelog
|