You are not logged in.
I noticed many AUR packages have cyclic build dependencies. For example, pypy3-build both requires and is required by pypy3-installer.
I don't have these packages installed on my system. How can I build either of them?
This problem also applies to the official packages (like python-build and python-installer) but there you can bootstrap by installing the official binary packages before rebuilding from source. What is the solution for AUR packages, which do not necessarily have binary packages?
Offline
You may want to specify that this is about makedepends as that's what makes it difficult. Some users get stumped with cyclical run time dependencies not realizing the packages can each be built, then installed in one transaction. But that's not the solution you need. Unfortunately, I can't help much as it seems to me that bootstrapping it by "lying" about the version of one of the makedependencies might be needed (this could be followed by a second "honest" rebuild).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
git diff of PKGBUILD pypy3-installer to allow bootstrapping:
diff --git a/PKGBUILD b/PKGBUILD
index c6a327d..2354cb9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,12 +8,16 @@ arch=(any)
url="https://${_base}.pypa.io"
license=(MIT)
depends=(pypy3)
-makedepends=(pypy3-build pypy3-flit-core)
+#makedepends=(pypy3-build pypy3-flit-core)
source=(${_base}-${pkgver}.tar.gz::https://github.com/pypa/${_base}/archive/${pkgver}.tar.gz)
sha512sums=('a509c6ea9d88b8527cce0428ca6109077820cb9aa352967a389012bac40f8ec04039ab73710f4fb32b32ed20affd520ce0ba16ba18d9d380ce0af1f51fe8e2c6')
build() {
cd ${_base}-${pkgver}
+ pypy3 -m venv venv
+ source venv/bin/activate
+ pypy3 -m ensurepip
+ pypy3 -m pip install build flit-core
pypy3 -m build --wheel --skip-dependency-check --no-isolation
}
Offline
loqs: Thanks for the suggestion but that doesn't seem like a drop-in replacement. It creates a package with paths like:
home/maks/build/pypy3-installer/src/installer-0.7.0/venv/lib/pypy3.10/site-packages/installer/
i.e., it doesn't actually install in the pypy3 site-packages directory.
Offline
I forgot to limit the venv's activation to build() only:
diff --git a/PKGBUILD b/PKGBUILD
index c6a327d..42bcc2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,13 +8,19 @@ arch=(any)
url="https://${_base}.pypa.io"
license=(MIT)
depends=(pypy3)
-makedepends=(pypy3-build pypy3-flit-core)
+#makedepends=(pypy3-build pypy3-flit-core)
source=(${_base}-${pkgver}.tar.gz::https://github.com/pypa/${_base}/archive/${pkgver}.tar.gz)
sha512sums=('a509c6ea9d88b8527cce0428ca6109077820cb9aa352967a389012bac40f8ec04039ab73710f4fb32b32ed20affd520ce0ba16ba18d9d380ce0af1f51fe8e2c6')
build() {
cd ${_base}-${pkgver}
+ (
+ pypy3 -m venv venv
+ source venv/bin/activate
+ pypy3 -m ensurepip
+ pypy3 -m pip install build flit-core
pypy3 -m build --wheel --skip-dependency-check --no-isolation
+ )
}
package() {
Offline
The maintainer of pypy3-flit-core emailed me with the suggestion of using binary packages from the arch4edu repository to bootstrap this. (Just wanted to share this in case someone else finds this thread via Google.)
Offline
Did my suggestion post #5 not work for you? Did you resolve the issue using binary packages from arch4edu?
Offline
Did my suggestion post #5 not work for you? Did you resolve the issue using binary packages from arch4edu?
Ah yes, I forgot to mention it explicitly, but your latest suggestion also worked, and actually that's what I used to build these packages on my system. But bootstrapping from binary packages might be easier in the future, since they don't require editing a bunch of PKGBUILDs manually (there were like six packages in total: build, installer, flit-core, packagin, pyproject-hooks, pyprojects-metadata). In any case, thanks for your help!
Last edited by maksverver (2024-09-19 19:20:11)
Offline