Package Details: python-libmamba 2.0.1-1

Git Clone URL: https://aur.archlinux.org/python-libmamba.git (read-only, click to copy)
Package Base: python-libmamba
Description: The fast cross-platform package manager
Upstream URL: https://github.com/mamba-org/mamba
Licenses: BSD-3-Clause
Conflicts: micromamba
Provides: libmamba, python-libmambapy
Submitter: brianrobt
Maintainer: flying-sheep (brianrobt)
Last Packager: flying-sheep
Votes: 4
Popularity: 1.08
First Submitted: 2024-08-04 19:38 (UTC)
Last Updated: 2024-11-02 13:11 (UTC)

Latest Comments

« First ‹ Previous 1 2

reemptive commented on 2024-09-21 11:08 (UTC)

I just had to patch this for fmt 11 https://github.com/mamba-org/mamba/commit/aea04951d07c00e3665e80278e84eb9e6c9e3666.patch

brianrobt commented on 2024-08-09 18:04 (UTC)

I uploaded another version to fix those issues. I'll open a discussion with gdolle about coordinating with micromamba. Thanks!

flying-sheep commented on 2024-08-09 09:39 (UTC) (edited on 2024-08-09 09:52 (UTC) by flying-sheep)

OK, that almost works, but you left some debug code in:

python -m installer --destdir="$pkgdir" dist/*.whl

not

python -m installer --destdir=testdir dist/*.whl

The metadata is also incorrect in some ways:

  1. this should provides=(libmamba), since it now includes that library (also it’s redundant to add $pkgname to provides)
  2. libsolv and reproc are dynamically linked, so they are runtime dependencies, not only make
  3. missing runtime dependency fmt
  4. instead of python-ninja, the make dependency is ninja
  5. missing make dependencies: spdlog, pybind11
  6. arch should be x86_64, not any

And finally, this package is now almost identical to micromamba. Maybe you should coordinate with https://aur.archlinux.org/account/gdolle?

So all in all:

arch=('x86_64')
depends=(
  'python>=3.9'
  'yaml-cpp>=0.8.0'
  'libsolv'
  'reproc'
  'fmt'
)
makedepends=(
  # header-only libs
  'cli11'
  'spdlog'
  'tl-expected'
  'nlohmann-json'
  # C++ build tools
  'ccache'
  'cmake>=3.18'
  'doctest'
  'ninja'
  'pybind11'
  # python build tools
  'python-build'
  'python-installer'
  'python-scikit-build>=0.13'
  'python-setuptools>=42'
  'python-wheel'
)
provides=('libmamba')

brianrobt commented on 2024-08-06 20:45 (UTC)

Thanks flying-sheep. I was in a bit of a hurry when releasing this one. I should have some time tonight to make the changes you suggested.

flying-sheep commented on 2024-08-06 09:02 (UTC) (edited on 2024-08-06 09:26 (UTC) by flying-sheep)

Here’s a PKGBUILD for libmamba.

I’m not sure if it’s 100% but it’s a start

pkgname=libmamba
pkgver=1.5.8
_srcver=2024.03.25
_name=mamba-$_srcver
pkgrel=1
pkgdesc="Mamba package manager C bindings"
arch=('any')
url="https://github.com/mamba-org/mamba"
license=('BSD')
depends=(reproc libsolv cli11)
# tl-expected is a header-only library so it’s compiled in
makedepends=(tl-expected cmake ccache python-ninja)
checkdepends=(doctest)
source=(
  $_name-$pkgver.tar.gz::$url/archive/refs/tags/$_srcver.tar.gz
)
sha512sums=('93263defae3a5ef0cd4ea16b1a9ac2bcdc63e0091043d6975fb2d4d9b5430eed224a33dcf4336e7967646b80204ce17f1190be31c2ca2b6725d424ee5f5c13bc')

prepare() {
  cd $srcdir/${_name}
}

build() {
  cd $srcdir/${_name}
  cmake -B build/ -G Ninja \
    -D CMAKE_C_COMPILER=gcc -D CMAKE_CXX_COMPILER=g++ \
    -D CMAKE_BUILD_WITH_INSTALL_RPATH=ON \
    -D BUILD_LIBMAMBA=ON \
    -D BUILD_LIBMAMBAPY=OFF \
    -D BUILD_MICROMAMBA=OFF \
    -D BUILD_MAMBA_PACKAGE=OFF \
    --preset mamba-shared-debug
  cmake --build build/ --parallel
}

package() {
  cd $srcdir/${_name}
  cmake --install build/ --prefix "$pkgdir/usr"
  install -Dm 644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE.txt
}

flying-sheep commented on 2024-08-06 08:18 (UTC) (edited on 2024-08-06 08:35 (UTC) by flying-sheep)

Seems like this build is missing the bindings submodule that conda needs.

You need to 1. build libmamba (the C library) and package it in a way that cmake can find it 2. have python-libmamba depend on it. I think you build python-libmamba by first calling cmake, then make and finally python -m build in the directory

I also wonder why you use bare setuptools here instead of python-build and python-installer. Is there a reason?

Also the dependencies are completely off: The only runtime dependency that’s correct is python, the rest are makedepends