Package Details: python-scienceplots 2.2.1-1

Git Clone URL: https://aur.archlinux.org/python-scienceplots.git (read-only, click to copy)
Package Base: python-scienceplots
Description: Format Matplotlib for scientific plotting
Upstream URL: https://github.com/garrettj403/SciencePlots
Licenses: MIT
Conflicts: python-scienceplots-git
Submitter: andreafeletto
Maintainer: carlosal1015 (pabryan)
Last Packager: carlosal1015
Votes: 0
Popularity: 0.000000
First Submitted: 2021-11-10 11:16 (UTC)
Last Updated: 2026-02-26 03:40 (UTC)

Latest Comments

hockeymikey commented on 2026-01-05 03:47 (UTC)

@bladewing Great fix! Can confirmed it worked for me!

bladewing commented on 2025-11-25 09:59 (UTC)

Build failure with setuptools-scm

The package currently fails to build with the following error:

LookupError: setuptools-scm was unable to detect version for /home/<username>/.cache/yay/python-scienceplots/src/SciencePlots-2.2.0
Root cause

The build uses --no-isolation which requires all build dependencies to be available in the build environment. Since the source tarball doesn't include .git metadata, setuptools-scm cannot automatically detect the version.

Fix

Two changes are needed:

  1. Add python-setuptools-scm to makedepends:
makedepends=(python-setuptools python-setuptools-scm python-build python-installer python-wheel)
  1. Set the version explicitly in the build() function:
build() {
  cd ${_base}-${pkgver}
  export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
  python -m build --wheel --skip-dependency-check --no-isolation
}
Complete diff
--- PKGBUILD
+++ PKGBUILD
@@ -9,11 +9,12 @@
 url="https://github.com/garrettj403/${_base}"
 license=(MIT)
 depends=(python-matplotlib)
-makedepends=(python-setuptools python-build python-installer python-wheel)
+makedepends=(python-setuptools python-setuptools-scm python-build python-installer python-wheel)
 source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
 sha512sums=('f8bd91f86f4034ea5d4fc2343649553c95be7d88c80e42d0506193ef8aef4a6ebb35cbb7413c93b15490d8db89c3eb8bfb268a7fc60b5404d572e33d9c3cf055')
 conflicts=(python-${_base,,}-git)

 build() {
   cd ${_base}-${pkgver}
+  export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
   python -m build --wheel --skip-dependency-check --no-isolation
 }

With these changes, the package builds and installs successfully.

carlosal1015 commented on 2023-05-31 18:40 (UTC)

Thanks @yuhldr for the hint.

yuhldr commented on 2023-05-31 03:24 (UTC)

source=(${_base}.tar.gz::${url}/archive/${pkgver}.tar.gz)

The above line in PKGBUILD suggests deleting the custom filename '${_base}.tar.gz::$', or changing it to the following

source=(${_base}-${pkgver}-${pkgrel}.tar.gz::${url}/archive/${pkgver}.tar.gz)

Because this now causes the system to not download the latest source file, directly package it with the last file, and then report the sha512sums error if the last 'SciencePlots.tar.gz' is cached locally

carlosal1015 commented on 2023-01-04 15:51 (UTC)

Thanks @yuhldr for the hint.

yuhldr commented on 2023-01-04 14:36 (UTC)

python-setuptools may be makedepends?