@ccorn
Thanks for the alternative method. It looks very good. And cheers for clearing up my python2-gobject2 confusion. I'll try to add your mods in tomorrow.
Regards.
Git Clone URL: | https://aur.archlinux.org/gnatstudio.git (read-only, click to copy) |
---|---|
Package Base: | gnatstudio |
Description: | GNAT Programming Studio for Ada. |
Upstream URL: | https://github.com/AdaCore/gps |
Licenses: | GPL |
Conflicts: | gnat-gps, gnatstudio-bin |
Submitter: | charlie5 |
Maintainer: | charlie5 |
Last Packager: | charlie5 |
Votes: | 22 |
Popularity: | 0.000000 |
First Submitted: | 2023-06-09 07:53 (UTC) |
Last Updated: | 2024-04-28 09:29 (UTC) |
« First ‹ Previous 1 2 3 4 5 6 7 8 9 .. 11 Next › Last »
@ccorn
Thanks for the alternative method. It looks very good. And cheers for clearing up my python2-gobject2 confusion. I'll try to add your mods in tomorrow.
Regards.
@charlie5: Same runtime behavior here:
On my system, python2-gobject is needed else gnatstudio crashes with an > 'ImportError: No module named gi' error message.
But when building in a chroot, python2-gobject2
is needed, otherwise the following fatal error occurs:
/build/gnat-gps/src/gps-21.0w-20200427-15496-src/gnatcoll_extras/src/python_support_gtk.c:19:10: fatal error: 'pygobject.h' file not found
In my checkout, I have now added both to depends
.
Because of the signature issue and the hassle of having to specify fallback packages, I have tried another approach: Just using
export PYTHONUSERBASE="$srcdir/.local"
export PATH="$srcdir/.local/bin:$PATH"
pip2 install --user --cache-dir "$startdir/.cache/pip2" sphinx
This works both in chroot and local builds without unduly affecting the host system while still using persistent caching to avoid repeated downloads.
It needs python2-pip
in makedepends
however.
I have checked that the file list of the resulting package is the same as in the previous revision, including documentation.
Here is the diff to the PKGBUILD
:
diff --git a/PKGBUILD b/PKGBUILD
index ecf9ba1..c9d7fd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ depends=("clang" "libadalang"
"gnome-icon-theme" "gnome-icon-theme-extras" "gnome-icon-theme-symbolic"
"python2-gobject2")
optdepends=('python2-jedi')
-makedepends=('gprbuild' 'texlive-latexextra' 'graphviz')
+makedepends=('gprbuild' 'texlive-latexextra' 'graphviz' 'python2-pip')
_gps_version=21.0w-20200427-15496
_gps_checksum=bfa68dd61a9288c79e9c08676878cac95e0fe628
@@ -49,6 +49,13 @@ sha1sums=("$_gps_checksum"
prepare()
{
+ # Install python2 packages that cannot be auto-installed via makedepends.
+ # Note that exports made here are visible in build() and package() as well.
+ # Use a persistent but package-specific download cache.
+ export PYTHONUSERBASE="$srcdir/.local"
+ export PATH="$srcdir/.local/bin:$PATH"
+ pip2 install --user --cache-dir "$startdir/.cache/pip2" sphinx
+
cd "$srcdir/gps-$_gps_version-src"
patch -p1 < "$srcdir/0002-Ignore-absence-of-version-number-in-user_guide.patch"
@@ -57,23 +64,13 @@ prepare()
patch -p1 < "$srcdir/0005-Fix-recursive-make-in-docs.patch"
# Force use of python2
- rm -fr temp_bin
- mkdir temp_bin
- ln -s /usr/bin/python2 temp_bin/python
- ln -s /usr/bin/python2-config temp_bin/python-config
- ln -s /usr/bin/sphinx-build2 temp_bin/sphinx-build
+ # Destination directory already populated by pip2 install
+ ln -sfT /usr/bin/python2 "$srcdir/.local/bin/python"
+ ln -sfT /usr/bin/python2-config "$srcdir/.local/bin/python-config"
# Link libadalang-tools and ada_language_server into the GPS source tree
ln -sf "$srcdir/libadalang-tools-$_laltools_ver-src" "$srcdir/gps-$_gps_version-src/laltools"
ln -sf "$srcdir/als-$_als_ver-src" "$srcdir/gps-$_gps_version-src/ada_language_server"
-
- # Install missing (obsolete) python2 packages from archives.
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-babel/python2-babel-2.8.0-5-any.pkg.tar.zst
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-imagesize/python2-imagesize-1.2.0-1-any.pkg.tar.xz
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-snowballstemmer/python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx-alabaster-theme/python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinxcontrib-websupport/python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz
- sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx/python2-sphinx-1.8.5-5-any.pkg.tar.zst
}
@@ -83,9 +80,6 @@ build()
export OS=unix
- # Force use of python2
- export PATH="$srcdir/gps-$_gps_version-src/temp_bin:$PATH"
-
./configure --prefix=/usr
# the release tarball contains a bunch of sphinx build artefacts
@@ -105,9 +99,6 @@ package()
export OS=unix
- # Force use of python2
- export PATH="$srcdir/gps-$_gps_version/temp_bin:$PATH"
-
make DESTDIR="$pkgdir/" install
# Add the desktop config.
Hi again @xiretza
I just noticed you've replaced python2-gobject with python2-gobject2. On my system, python2-gobject is needed else gnatstudio crashes with an 'ImportError: No module named gi' error message.
Also, I have built and ran gps without python2-gobject2 being needed.
Hi @xiretza ... thanks for bumping up the package version.
Hi @Armag67
You need to ...
$ sudo rm /var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz
$ sudo rm /var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz.sig
The same applies to several other obsolete python2 packages, which will show the same error message (so delete those also).
For the other problem, perhaps try pacaur or pikaur started in a terminal.
Hello, With today's update on Manjaro, pamac returns:
sudo: un terminal est requis pour lire le mot de passe; utilisez soit l'option -S pour lire depuis l'entrée standard ou configurez un outil askpass de demande de mot de passe
==> ERREUR : Une erreur s’est produite dans prepare().
Abandon…
and:
git clone https://aur.archlinux.org/gnat-gps.git
cd gnat-gps
makepkg -si
after identification returns:
erreur : '/var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz': paquet pour lequel la signature requise est manquante
==> ERREUR : Une erreur s’est produite dans prepare().
Abandon…
I will try to modify PKGBUILD.
After marking as comment these lines for the Python2 modules already up to date on my box:
# sudo pacman -U https://archive.archlinux.org/packages/p/python2-imagesize/python2-imagesize-1.2.0-1-any.pkg.tar.xz
# sudo pacman -U https://archive.archlinux.org/packages/p/python2-snowballstemmer/python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
# sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx-alabaster-theme/python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
# sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinxcontrib-websupport/python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz
# sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx/python2-sphinx-1.8.5-5-any.pkg.tar.zst
It seems to work, keep our fingers crossed...
IT WORKS!
@ccorn I've updated package to install the missing python2 packages from the archives. Thanks for letting us know of the problem.
@mindbound perhaps try rebuilding the gnatcoll-python package.
gnat-gps
needs a rebuild because of a libclang.so
version update.
Problem: python2-sphinx
and some of its dependencies seem to be no longer available from the standard repos.
I had to supply the following packages from the pacman cache:
python2-babel-2.8.0-4-any.pkg.tar.zst
python2-imagesize-1.2.0-1-any.pkg.tar.xz
python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
python2-sphinx-1.8.5-5-any.pkg.tar.zst
python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz
Pinned Comments
charlie5 commented on 2023-07-09 16:42 (UTC)
This package is available in the Arch Ada Repository.
charlie5 commented on 2023-06-25 17:14 (UTC) (edited on 2023-06-25 17:15 (UTC) by charlie5)
hi @GaryScottMartin,
'gnat-gps' has been recently deprecated in favour of 'gnatstudio'.
Regards.