fd1b9f
%{!?_with_bootstrap: %global bootstrap 0}
746366
%global with_python2 0%{?fedora} && 0%{?fedora} < 30
fd1b9f
fd1b9f
Name:           conda
876dfa
Version:        4.7.2
286c87
Release:        1%{?dist}
fd1b9f
Summary:        Cross-platform, Python-agnostic binary package manager
fd1b9f
fd1b9f
License:        BSD and ASL 2.0 and LGPLv2+ and MIT
fd1b9f
# The conda code is BSD
fd1b9f
# progressbar is LGPLv2+
fd1b9f
# six is MIT/X11
fd1b9f
# adapters/ftp.py is ASL 2.0
fd1b9f
fd1b9f
URL:            http://conda.pydata.org/docs/
fd1b9f
Source0:        https://github.com/conda/conda/archive/%{version}/%{name}-%{version}.tar.gz
e6d3f9
# Source0:        https://pypi.io/packages/source/c/%%{name}/%%{name}-%%{version}.tar.gz
fd1b9f
Patch0:         conda_sys_prefix.patch
2785a5
Patch1:         conda_gateways_disk_create.patch
2785a5
Patch2:         setup.patch
472330
da2616
Patch10001:     0001-Fix-toolz-imports.patch
da2616
Patch10002:     0002-Adjust-ruamel.yaml-imports.patch
da2616
Patch10003:     0003-Drop-fs-path-encoding-manipulation-under-python2.patch
da2616
Patch10004:     0004-Do-not-try-to-run-usr-bin-python.patch
da2616
Patch10005:     0005-Fix-failing-tests-in-test_api.py.patch
fd1b9f
fd1b9f
BuildArch:      noarch
fd1b9f
951dfa
Requires:       python%{python3_pkgversion}-conda = %{version}-%{release}
2785a5
# Removed upstream in favour of calling "conda activate" in version 4.4.0
2785a5
Obsoletes:	conda-activate < 4.4
fd1b9f
fb7115
%?python_enable_dependency_generator
fb7115
fd1b9f
BuildRequires:  sed
fd1b9f
fd1b9f
%global _description \
fd1b9f
Conda is a cross-platform, Python-agnostic binary package manager. It is the\
fd1b9f
package manager used by Anaconda installations, but it may be used for other\
fd1b9f
systems as well. Conda makes environments first-class citizens, making it easy\
fd1b9f
to create independent environments even for C libraries. Conda is written\
fd1b9f
entirely in Python.
fd1b9f
fd1b9f
%description %_description
fd1b9f
fd1b9f
%global _py2_reqs \
fd1b9f
        python2-crypto \
eb5541
        python2-pycosat >= 0.6.3 \
fd1b9f
        python2-ruamel-yaml \
fd1b9f
        python2-mock \
fd1b9f
        python2-responses
fd1b9f
fd1b9f
%global _py2_bund \
fd1b9f
        bundled(python2-appdirs) = 1.2.0 \
fd1b9f
        bundled(python2-auxlib) \
fd1b9f
        bundled(python2-boltons) = 16.5.1 \
fd1b9f
        bundled(python2-six) = 1.10.0 \
da2616
        bundled(python2-toolz) = 0.8.2 \
fd1b9f
        bundled(python2-urllib3) = 1.19.1
fd1b9f
fd1b9f
%global py2_reqs %(c="%_py2_reqs"; echo "$c" | xargs)
fd1b9f
%global py3_reqs %(c="%_py2_reqs"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
fd1b9f
fd1b9f
%global py2_bund %(c="%_py2_bund"; echo "$c" | xargs)
fd1b9f
%global py3_bund %(c="%_py2_bund"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
fd1b9f
61097a
%if %with_python2
fd1b9f
%package -n python2-conda
fd1b9f
Summary:        %{summary}
fd1b9f
1992f9
BuildRequires:  python2-devel
1992f9
BuildRequires:  python2-setuptools
fd1b9f
BuildRequires:  %py2_reqs
1992f9
BuildRequires:  python2-requests
472330
# When this is present, vendored toolz should not be used
951dfa
%if 0%{?fedora}
951dfa
# EPEL does not have new enough cytoolz
472330
BuildRequires:  python2-cytoolz
951dfa
%endif
fd1b9f
# For tests
a02fd4
BuildRequires:  python2-conda-package-handling >= 1.3.0
0fe78a
BuildRequires:  python2-enum34
2785a5
BuildRequires:  python2-futures
fd1b9f
BuildRequires:  python2-pytest-cov
fd1b9f
fb7115
# Keep manual Requires for now:
fb7115
# automatically generated Requires are missing a few modules.
fb7115
# Having both is still useful because the automatic ones have
fb7115
# version requirements.
eb5541
Requires:       %py2_reqs
a02fd4
Requires:       python2-conda-package-handling >= 1.3.0
0fe78a
Requires:       python2-enum34
fb7115
Requires:       python2-futures
951dfa
%if 0%{?fedora}
951dfa
# EPEL does not have new enough cytoolz
472330
Requires:       python2-cytoolz
951dfa
%endif
fd1b9f
Provides:       %py2_bund
fd1b9f
%{?python_provide:%python_provide python2-conda}
fd1b9f
fd1b9f
%description -n python2-conda %_description
61097a
%endif
fd1b9f
fd1b9f
%package -n python%{python3_pkgversion}-conda
fd1b9f
Summary:        %{summary}
fd1b9f
fd1b9f
BuildRequires:  python%{python3_pkgversion}-devel
fd1b9f
BuildRequires:  python%{python3_pkgversion}-setuptools
fd1b9f
BuildRequires:  %py3_reqs
fd1b9f
BuildRequires:  python%{python3_pkgversion}-requests
fd1b9f
BuildRequires:  python%{python3_pkgversion}-yaml
472330
# When this is present, vendored toolz should not be used
951dfa
%if 0%{?fedora}
951dfa
# EPEL does not have new enough cytoolz
da2616
BuildRequires:  python%{python3_pkgversion}-cytoolz >= 0.8.2
951dfa
%endif
fd1b9f
# For tests
a02fd4
BuildRequires:  python%{python3_pkgversion}-conda-package-handling >= 1.3.0
fd1b9f
BuildRequires:  python%{python3_pkgversion}-pytest-cov
fd1b9f
fd1b9f
Requires:       %py3_reqs
a02fd4
Requires:       python%{python3_pkgversion}-conda-package-handling >= 1.3.0
fd1b9f
Requires:       python%{python3_pkgversion}-requests
fd1b9f
Requires:       python%{python3_pkgversion}-yaml
951dfa
%if 0%{?fedora}
951dfa
# EPEL does not have new enough cytoolz
da2616
Requires:       python%{python3_pkgversion}-cytoolz >= 0.8.2
951dfa
%endif
fd1b9f
Provides:       %py3_bund
fd1b9f
%{?python_provide:%python_provide python%{python3_pkgversion}-conda}
fd1b9f
fd1b9f
%description -n python%{python3_pkgversion}-conda %_description
fd1b9f
fd1b9f
%prep
fd1b9f
%autosetup -p1
fd1b9f
fd1b9f
sed -r -i 's/^(__version__ = ).*/\1"%{version}"/' conda/__init__.py
fd1b9f
fd1b9f
# disable some stupid tests which fail with EXDEV
fd1b9f
sed -r -i 's/test_trash_outside_prefix/_disabled_\0/' tests/test_install.py
fd1b9f
sed -r -i 's/test_move_to_trash|test_move_path_to_trash_couldnt/_disabled_\0/' tests/gateways/disk/test_delete.py
fd1b9f
2785a5
# Skip TestJson.test_list which wants to muck around with /usr.
2785a5
sed -r -i 's/\btest_list\b/_disabled_\0/' tests/test_cli.py
2785a5
fd1b9f
# delete interpreter line, the user can always call the file
fd1b9f
# explicitly as python3 /usr/lib/python3.6/site-packages/conda/_vendor/appdirs.py
fd1b9f
# or so.
fd1b9f
sed -r -i '1 {/#![/]usr[/]bin[/]env/d}' conda/_vendor/appdirs.py
fd1b9f
472330
# Replaced by cytools, byte compilation fails under python3.7
951dfa
%if 0%{?fedora}
951dfa
# EPEL does not have new enough cytoolz
da2616
# We need to keep __init__.py which does the dispatch between vendored and non-vendored
da2616
rm conda/_vendor/toolz/[a-zA-Z]*
951dfa
%endif
472330
fd1b9f
%build
2785a5
# build conda executable
fd1b9f
%define py_setup utils/setup-testing.py
61097a
%if %with_python2
fd1b9f
%py2_build
61097a
%endif
fd1b9f
%py3_build
fd1b9f
fd1b9f
%install
2785a5
# install conda executable
fd1b9f
%define py_setup utils/setup-testing.py
fd1b9f
%if 0%{?fedora}
61097a
%if %with_python2
fd1b9f
%py2_install
61097a
%endif
fd1b9f
%py3_install
fd1b9f
%else
fd1b9f
%py3_install
61097a
%if %with_python2
fd1b9f
%py2_install
fd1b9f
%endif
61097a
%endif
fd1b9f
fd1b9f
mkdir -p %{buildroot}%{_datadir}/conda/condarc.d
fd1b9f
cat >%{buildroot}%{_datadir}/conda/condarc.d/defaults.yaml <<eof< code="">
fd1b9f
pkgs_dirs:
fd1b9f
 - /var/cache/conda/pkgs
fd1b9f
 - ~/.conda/pkgs
fd1b9f
EOF
fd1b9f
fd1b9f
mkdir -p %{buildroot}%{_localstatedir}/cache/conda/pkgs/cache
fd1b9f
951dfa
# install does not create the directory on EL7
951dfa
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
746366
install -m 0644 -Dt %{buildroot}/etc/profile.d/ conda/shell/etc/profile.d/conda.{sh,csh}
746366
sed -r -i '1i CONDA_EXE=%{_bindir}/conda' %{buildroot}/etc/profile.d/conda.sh
746366
sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \
746366
          -e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh
2785a5
fd1b9f
%check
fd1b9f
export PATH=%{buildroot}%{_bindir}:$PATH
2785a5
2785a5
# Integration tests generally require network, so skip them.
da2616
# tests/core/test_initialize.py tries to unlink /usr/bin/python3
da2616
# test_create_advanced_pip connects to pypi
da2616
py.test-%{python3_version} -vv -m "not integration" \
da2616
    -k 'not test_create_advanced_pip' \
746366
    --ignore tests/core/test_initialize.py %{?el7:|| :}
fd1b9f
61097a
%if %with_python2
2785a5
# Run python2 tests later, since they are more likely to fail stupidly.
0898a5
# Some tests fail because py2 does not default to utf-8.
0898a5
py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
61097a
%endif
2785a5
fd1b9f
%files
fd1b9f
%{_bindir}/conda
fd1b9f
%{_bindir}/conda-env
2785a5
/etc/profile.d/conda.sh
2785a5
/etc/profile.d/conda.csh
fd1b9f
61097a
%if %with_python2
fd1b9f
%files -n python2-conda
fd1b9f
%license LICENSE.txt
fd1b9f
%doc CHANGELOG.md README.rst
fd1b9f
%{python2_sitelib}/conda/
fd1b9f
%{python2_sitelib}/conda_env/
fd1b9f
%{python2_sitelib}/*.egg-info
da2616
%exclude %{python2_sitelib}/test_data/
fd1b9f
%{_localstatedir}/cache/conda/
fd1b9f
%{_datadir}/conda/
61097a
%endif
fd1b9f
fd1b9f
%files -n python%{python3_pkgversion}-conda
fd1b9f
%license LICENSE.txt
fd1b9f
%doc CHANGELOG.md README.rst
fd1b9f
%{python3_sitelib}/conda/
fd1b9f
%{python3_sitelib}/conda_env/
fd1b9f
%{python3_sitelib}/*.egg-info
da2616
%exclude %{python3_sitelib}/test_data/
fd1b9f
%{_localstatedir}/cache/conda/
fd1b9f
%{_datadir}/conda/
fd1b9f
fd1b9f
fd1b9f
%changelog
876dfa
* Tue Jun 11 2019 Orion Poplawski <orion@nwra.com> - 4.7.2-1
876dfa
- Update to 4.7.2
876dfa
e32dd0
* Sun Jun  9 2019 Orion Poplawski <orion@nwra.com> - 4.7.1-1
e32dd0
- Update to 4.7.1
e32dd0
6859d5
* Tue Apr 16 2019 Orion Poplawski <orion@nwra.com> - 4.6.13-1
6859d5
- Update to 4.6.13
6859d5
6859d5
* Thu Apr  4 2019 Orion Poplawski <orion@nwra.com> - 4.6.11-1
286c87
- Update to 4.6.11
286c87
746366
* Tue Apr  2 2019 Orion Poplawski <orion@nwra.com> - 4.6.9-2
746366
- Fix conda profile scripts
746366
- Do not build for python2 on EPEL
746366
- Ignore test failures on EPEL7
746366
ce0f55
* Sat Mar 30 2019 Orion Poplawski <orion@nwra.com> - 4.6.9-1
ce0f55
- Update to 4.6.9
ce0f55
da2616
* Wed Feb 13 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.6.5-1
da2616
- Update to latest upstream version (#1668145)
da2616
cec924
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.12-2
cec924
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cec924
e3d4f9
* Mon Dec 31 2018 Orion Poplawski <orion@nwra.com> - 4.5.12-1
e3d4f9
- Update to 4.5.12
e3d4f9
951dfa
* Mon Dec 31 2018 Orion Poplawski <orion@nwra.com> - 4.5.11-2
951dfa
- EPEL7 compatability
951dfa
0898a5
* Fri Sep 21 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.5.11-1
0898a5
- Update to latest stable version (#1570217)
61097a
- Disable python2 subpackage on F30+
0898a5
472330
* Fri Jul 13 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.11-4
472330
- Pull in python[23]-cytoolz to replace bundled toolz
472330
4ae297
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.11-4
4ae297
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4ae297
59bd7c
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.4.11-3
59bd7c
- Rebuilt for Python 3.7
59bd7c
eb5541
* Wed Apr 18 2018 Orion Poplawski <orion@nwra.com> - 4.4.11-2
eb5541
- Set _CONDA_ROOT in /etc/profile.d/conda.csh
eb5541
- Fix python2 requires
eb5541
- Require pycosat >= 0.6.3
eb5541
f94a0c
* Sat Apr 14 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.11-1
f94a0c
- Update to latest upstream version in the 4.4.x branch (#1544046)
f94a0c
2785a5
* Wed Feb  7 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.9-1
2785a5
- Update to v4.4.9 (#1542874)
2785a5
- conda-activate binary rpm is retired. The new way to activate the environment
2785a5
  is to say 'conda activate'. See
2785a5
  https://github.com/conda/conda/releases/tag/4.4.0 for more information.
2785a5
1992f9
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.3.24-5
1992f9
- Update Python 2 dependency declarations to new packaging standards
1992f9
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
1992f9
711d33
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.24-4
711d33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
711d33
fd1b9f
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-3
fd1b9f
- Install just one version of the executables (python 2 or 3)
fd1b9f
fd1b9f
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-2
fd1b9f
- Add all licenses to the License tag
fd1b9f
- Add Provides: bundled(...) for all the "vendored" dependencies
fd1b9f
- Update descriptions and simplify the spec file a bit
fd1b9f
- Move condarc.d directory under /usr/share/conda
fd1b9f
fd1b9f
* Thu Aug  3 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.3.24-1
fd1b9f
- Update to latest version
fd1b9f
- Switch /usr/bin/conda to python3
fd1b9f
fd1b9f
* Thu Jul 21 2016 Orion Poplawski <orion@cora.nwra.com> - 4.1.6-1
fd1b9f
- Update to 4.1.6
fd1b9f
fd1b9f
* Thu Dec 31 2015 Orion Poplawski <orion@cora.nwra.com> - 3.19.0-1
fd1b9f
- Update to 3.19.0
fd1b9f
fd1b9f
* Thu Dec 31 2015 Orion Poplawski <orion@cora.nwra.com> - 3.18.8-2
fd1b9f
- Add python 3 version
fd1b9f
fd1b9f
* Mon Dec 7 2015 Orion Poplawski <orion@cora.nwra.com> - 3.18.8-1
fd1b9f
- Update to 3.18.8
fd1b9f
fd1b9f
* Thu Sep 24 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-6
fd1b9f
- Do not create broken symlinks if activate/deactivate are not installed
fd1b9f
- Do not create /usr/conda-meta to prevent accidental installs into system
fd1b9f
fd1b9f
* Thu Sep 24 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-5
fd1b9f
- Non-bootstrap build
fd1b9f
fd1b9f
* Wed Sep 23 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-4
fd1b9f
- Add patch to support rootless mode
fd1b9f
- Require python-crypto
fd1b9f
- Create /usr/conda-meta, /usr/.condarc, /var/cache/conda
fd1b9f
fd1b9f
* Tue Sep 22 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-3
fd1b9f
- Require python-requests, python-yaml
fd1b9f
fd1b9f
* Tue Sep 22 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-2
fd1b9f
- Add patch to allow overriding pkgs_dirs in .condarc
fd1b9f
fd1b9f
* Mon Sep 21 2015 Orion Poplawski <orion@cora.nwra.com> - 3.17.0-1
fd1b9f
- Initial package