dev-db/dbeaver-bin: bump version to 24.0.4
[gentoo-zh.git] / dev-python / conda / conda-24.3.0.ebuild
blobec4d48bfa63ae57d42b10b372a5aa15c00677494
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 DISTUTILS_USE_PEP517=hatchling
7 DISTUTILS_SINGLE_IMPL=1
8 PYTHON_COMPAT=( python3_{9..11} )
9 inherit distutils-r1
11 DESCRIPTION="OS-agnostic, system-level binary package manager and ecosystem"
12 HOMEPAGE="https://conda.io/"
13 SRC_URI="https://github.com/conda/conda/archive/${PV}.tar.gz -> ${P}.tar.gz"
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64"
19 DEPEND="dev-vcs/git
20 $(python_gen_cond_dep '
21 dev-python/archspec[${PYTHON_USEDEP}]
22 dev-python/pyopenssl[${PYTHON_USEDEP}]
23 dev-python/pluggy[${PYTHON_USEDEP}]
24 dev-python/requests[${PYTHON_USEDEP}]
25 dev-python/ruamel-yaml[${PYTHON_USEDEP}]
26 dev-python/toolz[${PYTHON_USEDEP}]
27 dev-python/tqdm[${PYTHON_USEDEP}]
28 dev-python/truststore[${PYTHON_USEDEP}]
29 dev-python/jsonpatch[${PYTHON_USEDEP}]
30 dev-python/conda-package-handling[${PYTHON_USEDEP}]
31 dev-python/conda-package-streaming[${PYTHON_USEDEP}]
32 pycosat? ( dev-python/pycosat[${PYTHON_USEDEP}] )')
33 mamba? ( dev-python/conda-libmamba-solver[${PYTHON_SINGLE_USEDEP}] )"
34 RDEPEND="${DEPEND}"
36 IUSE="+user +mamba pycosat"
37 REQUIRED_USE="|| ( mamba pycosat )"
39 distutils_enable_tests pytest
41 PATCHES=(
42 "${FILESDIR}/conda-23.11.0-remove-tests.patch"
45 python_prepare_all() {
46 echo ${PV} > conda/.version || die
47 sed -i "s/deprecated.topic(\"24.3\", \"24.9\")//g" conda/shell/bin/conda || die
48 distutils-r1_python_prepare_all
51 python_install() {
52 distutils-r1_python_install
53 rm "${ED}/usr/bin/conda" || die
54 cp "${S}/conda/shell/bin/conda" "${ED}/usr/bin/conda" || die
55 # no need for Python Byte compiling and multi python slot, please do not use python_doscript
56 # this ebuild just use one stable python target
59 python_install_all() {
60 if use user ; then
61 echo "$(cat "${FILESDIR}/condarc.user")" >> "${T}/condarc" || die
63 # conda use libmamba as default solver
64 if ! use mamba; then
65 echo "$(cat "${FILESDIR}/condarc.classic")" >> "${T}/condarc" || die
67 insinto /etc/conda
68 doins "${T}/condarc"
71 pkg_postinst() {
72 elog "Initialize conda for shell interaction, "
73 elog "run 'conda init shells' "
74 elog "Currently compatible shells are {bash, fish, powershell, tcsh, xonsh, zsh}"
75 elog "base environment is managed by portage, do not use conda in base env!"