orion / rpms / conda

Forked from rpms/conda 6 years ago
Clone

Blame conda.spec

fd1b9f9
%{!?_with_bootstrap: %global bootstrap 0}
fd1b9f9
fd1b9f9
Name:           conda
fd1b9f9
Version:        4.3.24
fd1b9f9
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
fd1b9f9
# Source0:        https://pypi.io/packages/source/c/%{name}/%{name}-%{version}.tar.gz
fd1b9f9
Patch0:         conda_sys_prefix.patch
fd1b9f9
fd1b9f9
BuildArch:      noarch
fd1b9f9
fd1b9f9
Requires:       python3-conda = %{version}-%{release}
fd1b9f9
fd1b9f9
BuildRequires:  sed
fd1b9f9
fd1b9f9
%global _description \
fd1b9f9
Conda is a cross-platform, Python-agnostic binary package manager. It is the\
fd1b9f9
package manager used by Anaconda installations, but it may be used for other\
fd1b9f9
systems as well. Conda makes environments first-class citizens, making it easy\
fd1b9f9
to create independent environments even for C libraries. Conda is written\
fd1b9f9
entirely in Python.
fd1b9f9
fd1b9f9
%description %_description
fd1b9f9
fd1b9f9
%global _py2_reqs \
fd1b9f9
        python2-crypto \
fd1b9f9
        python2-pycosat \
fd1b9f9
        python2-ruamel-yaml \
fd1b9f9
        python2-mock \
fd1b9f9
        python2-responses
fd1b9f9
fd1b9f9
%global _py2_bund \
fd1b9f9
        bundled(python2-appdirs) = 1.2.0 \
fd1b9f9
        bundled(python2-auxlib) \
fd1b9f9
        bundled(python2-boltons) = 16.5.1 \
fd1b9f9
        bundled(python2-six) = 1.10.0 \
fd1b9f9
        bundled(python2-toolz) = 0.8.0 \
fd1b9f9
        bundled(python2-urllib3) = 1.19.1
fd1b9f9
fd1b9f9
%global py2_reqs %(c="%_py2_reqs"; echo "$c" | xargs)
fd1b9f9
%global py3_reqs %(c="%_py2_reqs"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
fd1b9f9
fd1b9f9
%global py2_bund %(c="%_py2_bund"; echo "$c" | xargs)
fd1b9f9
%global py3_bund %(c="%_py2_bund"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
fd1b9f9
fd1b9f9
%package -n python2-conda
fd1b9f9
Summary:        %{summary}
fd1b9f9
fd1b9f9
BuildRequires:  python-devel
fd1b9f9
BuildRequires:  python-setuptools
fd1b9f9
BuildRequires:  %py2_reqs
fd1b9f9
BuildRequires:  python-requests
fd1b9f9
BuildRequires:  PyYAML
fd1b9f9
# For tests
fd1b9f9
BuildRequires:  python2-pytest-cov
fd1b9f9
fd1b9f9
Requires:       %py2_reqs
fd1b9f9
Requires:       python-requests
fd1b9f9
Requires:       PyYAML
fd1b9f9
Provides:       %py2_bund
fd1b9f9
%{?python_provide:%python_provide python2-conda}
fd1b9f9
fd1b9f9
%description -n python2-conda %_description
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
fd1b9f9
BuildRequires:  python%{python3_pkgversion}-requests
fd1b9f9
BuildRequires:  python%{python3_pkgversion}-yaml
fd1b9f9
# For tests
fd1b9f9
BuildRequires:  python%{python3_pkgversion}-pytest-cov
fd1b9f9
fd1b9f9
Requires:       %py3_reqs
fd1b9f9
Requires:       python%{python3_pkgversion}-requests
fd1b9f9
Requires:       python%{python3_pkgversion}-yaml
fd1b9f9
Provides:       %py3_bund
fd1b9f9
%{?python_provide:%python_provide python%{python3_pkgversion}-conda}
fd1b9f9
fd1b9f9
%description -n python%{python3_pkgversion}-conda %_description
fd1b9f9
fd1b9f9
%package activate
fd1b9f9
Summary:        Activate conda environments in shell
fd1b9f9
Requires:       %{name} = %{version}-%{release}
fd1b9f9
fd1b9f9
%description activate
fd1b9f9
This package provides scripts that can be sourced in a shell to
fd1b9f9
activate and dectivate a specific conda environment by setting $PATH
fd1b9f9
and other shell variables.
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
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
fd1b9f9
%build
fd1b9f9
%py2_build
fd1b9f9
%py3_build
fd1b9f9
fd1b9f9
# build activate/deactivate
fd1b9f9
%define py_setup utils/setup-testing.py
fd1b9f9
%py2_build
fd1b9f9
%py3_build
fd1b9f9
fd1b9f9
%install
fd1b9f9
%if 0%{?fedora}
fd1b9f9
%py2_install
fd1b9f9
%py3_install
fd1b9f9
%else
fd1b9f9
%py3_install
fd1b9f9
%py2_install
fd1b9f9
%endif
fd1b9f9
fd1b9f9
# install activate/deactivate
fd1b9f9
%define py_setup utils/setup-testing.py
fd1b9f9
%if 0%{?fedora}
fd1b9f9
%py2_install
fd1b9f9
%py3_install
fd1b9f9
%else
fd1b9f9
%py3_install
fd1b9f9
%py2_install
fd1b9f9
%endif
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
fd1b9f9
%check
fd1b9f9
# integration tests generally require network, so skip them
fd1b9f9
export PATH=%{buildroot}%{_bindir}:$PATH
fd1b9f9
py.test-%{python2_version} -vv -m "not integration"
fd1b9f9
py.test-%{python3_version} -vv -m "not integration"
fd1b9f9
fd1b9f9
%files
fd1b9f9
%{_bindir}/conda
fd1b9f9
%{_bindir}/conda-env
fd1b9f9
fd1b9f9
%files activate
fd1b9f9
%{_bindir}/activate
fd1b9f9
%{_bindir}/deactivate
fd1b9f9
fd1b9f9
%files -n python2-conda
fd1b9f9
%license LICENSE.txt
fd1b9f9
%doc CHANGELOG.md README.rst
fd1b9f9
%{python2_sitelib}/conda/
fd1b9f9
%{python2_sitelib}/conda_env/
fd1b9f9
%{python2_sitelib}/*.egg-info
fd1b9f9
%{_localstatedir}/cache/conda/
fd1b9f9
%{_datadir}/conda/
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
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