fd1b9f9
%{!?_with_bootstrap: %global bootstrap 0}
fd1b9f9
fd1b9f9
Name:           conda
f8c51ee
Version:        4.8.3
b4d646a
Release:        3%{?dist}
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
2785a51
Patch2:         setup.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
4723304
da2616f
Patch10001:     0001-Fix-toolz-imports.patch
da2616f
Patch10003:     0003-Drop-fs-path-encoding-manipulation-under-python2.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
14bfdb2
Patch10007:     0007-Fix-import-of-collections.abc.Iterable.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
eddb4eb
C libraries. Conda is written entirely in Python.}
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 \
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
999f1f9
BuildRequires:  python%{python3_pkgversion}-mock
fd1b9f9
BuildRequires:  python%{python3_pkgversion}-pytest-cov
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
fd1b9f9
fd1b9f9
# disable some stupid tests which fail with EXDEV
fd1b9f9
sed -r -i 's/test_trash_outside_prefix/_disabled_\0/' tests/test_install.py
fd1b9f9
sed -r -i 's/test_move_to_trash|test_move_path_to_trash_couldnt/_disabled_\0/' tests/gateways/disk/test_delete.py
fd1b9f9
2785a51
# Skip TestJson.test_list which wants to muck around with /usr.
2785a51
sed -r -i 's/\btest_list\b/_disabled_\0/' tests/test_cli.py
2785a51
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
8bac080
rm conda/_vendor/cpuinfo.py
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/'
999f1f9
rm -r conda/_vendor/{distro.py,frozendict.py,tqdm}
999f1f9
find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\|frozendict\|tqdm\).*\) import/\1from \2 import/'
999f1f9
999f1f9
fd1b9f9
%build
2785a51
# build conda executable
fd1b9f9
%define py_setup utils/setup-testing.py
fd1b9f9
%py3_build
fd1b9f9
fd1b9f9
%install
2785a51
# install conda executable
fd1b9f9
%define py_setup utils/setup-testing.py
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
2785a51
7850a7c
# Install bash completion script
7850a7c
install -m 0644 -Dt %{buildroot}%{bash_completionsdir}/ %SOURCE1
999f1f9
999f1f9
fd1b9f9
%check
fd1b9f9
export PATH=%{buildroot}%{_bindir}:$PATH
2785a51
2785a51
# Integration tests generally require network, so skip them.
999f1f9
# tests/core/test_initialize.py tries to unlink /usr/bin/python3 and fails when python is a release candidate
fb5c7ae
#
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.
da2616f
py.test-%{python3_version} -vv -m "not integration" \
999f1f9
    --deselect=tests/core/test_solve.py::test_python2_update \
c0d92a1
    --deselect=tests/core/test_subdir_data.py::test_subdir_data_prefers_conda_to_tar_bz2 \
999f1f9
    --deselect=tests/core/test_package_cache_data.py::test_ProgressiveFetchExtract_prefers_conda_v2_format \
c0d92a1
    --deselect=tests/core/test_subdir_data.py::test_use_only_tar_bz2 \
7463660
    --ignore tests/core/test_initialize.py %{?el7:|| :}
fd1b9f9
2785a51
fd1b9f9
%files
fd1b9f9
%{_bindir}/conda
fd1b9f9
%{_bindir}/conda-env
7850a7c
%{bash_completionsdir}/conda
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
da2616f
%exclude %{python3_sitelib}/test_data/
fd1b9f9
%{_localstatedir}/cache/conda/
fd1b9f9
%{_datadir}/conda/
fd1b9f9
fd1b9f9
fd1b9f9
%changelog
b4d646a
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.3-3
b4d646a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b4d646a
0fdb3c7
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.8.3-2
0fdb3c7
- Rebuilt for Python 3.9
0fdb3c7
f8c51ee
* Sun Mar 14 2020 Orion Poplawski <orion@nwra.com> - 4.8.3-1
f8c51ee
- Update to 4.8.3
f8c51ee
14bfdb2
* Tue Feb  4 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.2-2
14bfdb2
- Fix import for python3.9 compatiblity (#1797691)
14bfdb2
7850a7c
* Tue Jan 28 2020 Orion Poplawski <orion@nwra.com> - 4.8.2-1
f1e9ffd
- Update to 4.8.2 (#1785658)
7850a7c
- Obtain bash completion file from github - tartansandal/conda-bash-completion
7850a7c
7a8aa11
* Mon Jan 20 2020 Orion Poplawski <orion@nwra.com> - 4.8.0-2
7a8aa11
- Install bash completion file (bz#1791068)
7a8aa11
999f1f9
* Sat Dec 14 2019 Orion Poplawski <orion@nwra.com> - 4.8.0-1
999f1f9
- Update to 4.8.0
999f1f9
- Make "conda shell.bash hook" work (bz#1737165)
999f1f9
- Unbundle more libraries
999f1f9
d444d14
* Sat Sep 14 2019 Orion Poplawski <orion@nwra.com> - 4.7.12-1
d444d14
- Update to 4.7.12
d444d14
677e659
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.7.11-2
677e659
- Rebuilt for Python 3.8
677e659
8bac080
* Fri Aug 16 2019 Orion Poplawski <orion@nwra.com> - 4.7.11-1
8bac080
- Update to 4.7.11
8bac080
- Use system py-cpuinfo
8bac080
bdae222
* Fri Aug 16 2019 Orion Poplawski <orion@nwra.com> - 4.7.10-2
bdae222
- Cleanup requires some (drop crypto, yaml; add pyOpenSSL; 
bdae222
  add versions for requests and ruamel-yaml
bdae222
fd9a929
* Sat Aug  3 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.7.10-1
fd9a929
- Fix 'conda shell.* hook' invocations (#1737165)
fd9a929
8bb5f9f
* Wed Jul 31 2019 Orion Poplawski <orion@nwra.com> - 4.7.10-1
8bb5f9f
- Update to 4.7.10
8bb5f9f
41ace6b
* Mon Jul 29 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.7.6-1
41ace6b
- Update to latest version (#1678578)
41ace6b
ceb2b72
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.7.2-2
ceb2b72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ceb2b72
876dfab
* Tue Jun 11 2019 Orion Poplawski <orion@nwra.com> - 4.7.2-1
876dfab
- Update to 4.7.2
876dfab
e32dd05
* Sun Jun  9 2019 Orion Poplawski <orion@nwra.com> - 4.7.1-1
e32dd05
- Update to 4.7.1
e32dd05
6859d5f
* Tue Apr 16 2019 Orion Poplawski <orion@nwra.com> - 4.6.13-1
6859d5f
- Update to 4.6.13
6859d5f
6859d5f
* Thu Apr  4 2019 Orion Poplawski <orion@nwra.com> - 4.6.11-1
286c871
- Update to 4.6.11
286c871
7463660
* Tue Apr  2 2019 Orion Poplawski <orion@nwra.com> - 4.6.9-2
7463660
- Fix conda profile scripts
7463660
- Do not build for python2 on EPEL
7463660
- Ignore test failures on EPEL7
7463660
ce0f553
* Sat Mar 30 2019 Orion Poplawski <orion@nwra.com> - 4.6.9-1
ce0f553
- Update to 4.6.9
ce0f553
da2616f
* Wed Feb 13 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.6.5-1
da2616f
- Update to latest upstream version (#1668145)
da2616f
cec924d
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.12-2
cec924d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cec924d
e3d4f98
* Mon Dec 31 2018 Orion Poplawski <orion@nwra.com> - 4.5.12-1
e3d4f98
- Update to 4.5.12
e3d4f98
951dfa8
* Mon Dec 31 2018 Orion Poplawski <orion@nwra.com> - 4.5.11-2
951dfa8
- EPEL7 compatability
951dfa8
0898a53
* Fri Sep 21 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.5.11-1
0898a53
- Update to latest stable version (#1570217)
61097a6
- Disable python2 subpackage on F30+
0898a53
4723304
* Fri Jul 13 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.11-4
4723304
- Pull in python[23]-cytoolz to replace bundled toolz
4723304
4ae297c
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.11-4
4ae297c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4ae297c
59bd7c9
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.4.11-3
59bd7c9
- Rebuilt for Python 3.7
59bd7c9
eb5541d
* Wed Apr 18 2018 Orion Poplawski <orion@nwra.com> - 4.4.11-2
eb5541d
- Set _CONDA_ROOT in /etc/profile.d/conda.csh
eb5541d
- Fix python2 requires
eb5541d
- Require pycosat >= 0.6.3
eb5541d
f94a0c5
* Sat Apr 14 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.11-1
f94a0c5
- Update to latest upstream version in the 4.4.x branch (#1544046)
f94a0c5
2785a51
* Wed Feb  7 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.9-1
2785a51
- Update to v4.4.9 (#1542874)
2785a51
- conda-activate binary rpm is retired. The new way to activate the environment
2785a51
  is to say 'conda activate'. See
2785a51
  https://github.com/conda/conda/releases/tag/4.4.0 for more information.
2785a51
1992f98
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.3.24-5
1992f98
- Update Python 2 dependency declarations to new packaging standards
1992f98
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
1992f98
711d33f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.24-4
711d33f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
711d33f
fd1b9f9
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-3
fd1b9f9
- Install just one version of the executables (python 2 or 3)
fd1b9f9
fd1b9f9
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-2
fd1b9f9
- Add all licenses to the License tag
fd1b9f9
- Add Provides: bundled(...) for all the "vendored" dependencies
fd1b9f9
- Update descriptions and simplify the spec file a bit
fd1b9f9
- Move condarc.d directory under /usr/share/conda
fd1b9f9
fd1b9f9
* Thu Aug  3 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-1
fd1b9f9
- Update to latest version
fd1b9f9
- Switch /usr/bin/conda to python3
fd1b9f9
fd1b9f9
* Thu Jul 21 2016 Orion Poplawski <orion@cora.nwra.com> - 4.1.6-1
fd1b9f9
- Update to 4.1.6
fd1b9f9
fd1b9f9
* Thu Dec 31 2015 Orion Poplawski <orion@cora.nwra.com> - 3.19.0-1
fd1b9f9
- Update to 3.19.0
fd1b9f9
fd1b9f9
* Thu Dec 31 2015 Orion Poplawski <orion@cora.nwra.com> - 3.18.8-2
fd1b9f9
- Add python 3 version
fd1b9f9
fd1b9f9
* Mon Dec 7 2015 Orion Poplawski <orion@cora.nwra.com> - 3.18.8-1
fd1b9f9
- Update to 3.18.8
fd1b9f9
fd1b9f9
* Thu Sep 24 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-6
fd1b9f9
- Do not create broken symlinks if activate/deactivate are not installed
fd1b9f9
- Do not create /usr/conda-meta to prevent accidental installs into system
fd1b9f9
fd1b9f9
* Thu Sep 24 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-5
fd1b9f9
- Non-bootstrap build
fd1b9f9
fd1b9f9
* Wed Sep 23 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-4
fd1b9f9
- Add patch to support rootless mode
fd1b9f9
- Require python-crypto
fd1b9f9
- Create /usr/conda-meta, /usr/.condarc, /var/cache/conda
fd1b9f9
fd1b9f9
* Tue Sep 22 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-3
fd1b9f9
- Require python-requests, python-yaml
fd1b9f9
fd1b9f9
* Tue Sep 22 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-2
fd1b9f9
- Add patch to allow overriding pkgs_dirs in .condarc
fd1b9f9
fd1b9f9
* Mon Sep 21 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-1
fd1b9f9
- Initial package