blob: 3d18f9e30d71324d3cd9557b45c46bb99300d51b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Maintainer: Brian Thompson <brianrobt@pm.me>
# Contributor: Daniel Maslowski <info@orangecms.org>
# Contributor: Ke Liu <specter119@gmail.com>
pkgname=python-conda
_name=${pkgname#python-}
pkgver=25.1.1
pkgrel=1
pkgdesc="OS-agnostic, system-level binary package manager and ecosystem https://conda.io"
arch=('any')
url="https://github.com/conda/conda"
license=('BSD-3-Clause')
depends=(
'python>=3.7'
'python-archspec'
'python-boltons'
'python-boto3'
'python-botocore'
'python-conda-package-handling'
'python-conda-libmamba-solver'
'python-platformdirs'
'python-pluggy>=1.0.0'
'python-pycosat>=0.6.3'
'python-requests>=2.20.1'
'python-ruamel-yaml>=0.11.14'
'python-tqdm'
)
checkdepends=(
'python-pytest'
'python-pytest-mock'
)
makedepends=(
'python-build'
'python-installer'
'python-hatchling'
'python-hatch-vcs'
'python-wheel'
)
provides=('python-conda' 'python-conda-env')
options=(!emptydirs)
backup=(etc/conda/condarc)
source=("$url/releases/download/$pkgver/$_name-$pkgver.tar.gz"
"py-3.13-logging.patch")
sha256sums=('12aeb248b3c1c598f3512425571de3a5aa8737fd8f1001a5ea32156ac4745f53'
'dcd0edb6cc59c67629ddfa6e9fb38f53eff293df92d8a0222ede051c8e66b149')
prepare() {
# cd "$srcdir"
# tar xvf "$_name-$pkgver.tar.gz"
cd "$srcdir/$_name-$pkgver" || exit
patch -p 1 -i "$srcdir/py-3.13-logging.patch"
sed -i '3s/^/set _CONDA_EXE=\/usr\/bin\/conda\n/' conda/shell/etc/profile.d/conda.csh
sed -i '3s/^/export CONDA_EXE=\/usr\/bin\/conda\n/' conda/shell/etc/profile.d/conda.sh
sed -i '8s/^/set -l CONDA_EXE \/usr\/bin\/conda\n/' conda/shell/etc/fish/conf.d/conda.fish
echo -e 'envs_dirs:\n - ~/.conda/envs\npkgs_dirs:\n - ~/.conda/pkgs' > condarc
}
build() {
cd "$srcdir/$_name-$pkgver" || exit
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/$_name-$pkgver" || exit
# install package contents
python -m installer --destdir "$pkgdir" "$srcdir/$_name-$pkgver/dist/$_name-$pkgver-"*.whl
# patch binary
sed -i 's/conda\.cli\.main_pip/conda.cli.main/' "$pkgdir/usr/bin/conda"
# install completions and conda shell function
mkdir -p "$pkgdir/"{usr/share/fish/functions,etc/profile.d}
_site_packages="$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
ln -s "$_site_packages/conda/shell/etc/fish/conf.d/conda.fish" "$pkgdir/usr/share/fish/functions/conda.fish"
ln -s "$_site_packages/conda/shell/etc/profile.d/conda.csh" "$pkgdir/etc/profile.d/conda.csh"
ln -s "$_site_packages/conda/shell/etc/profile.d/conda.sh" "$pkgdir/etc/profile.d/conda.sh"
# install config and license
install -Dm 644 condarc "$pkgdir/etc/conda/condarc"
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
|