Package Details: fortls 3.1.2-1

Git Clone URL: https://aur.archlinux.org/fortls.git (read-only, click to copy)
Package Base: fortls
Description: A modern Language Server for Fortran.
Upstream URL: https://github.com/gnikit/fortls
Keywords: fortran
Licenses: MIT
Conflicts: fortran-language-server
Provides: fortran-language-server
Submitter: fosskers
Maintainer: fosskers
Last Packager: fosskers
Votes: 4
Popularity: 0.002467
First Submitted: 2022-03-04 08:48 (UTC)
Last Updated: 2024-07-10 02:31 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

fosskers commented on 2023-10-11 07:32 (UTC)

Hi @MarsSeed, thanks for the report. I've forwarded the suggestion upstream: https://github.com/fortran-lang/fortls/issues/326

MarsSeed commented on 2023-10-10 13:09 (UTC)

This needs depends=python-packaging.

Also please kindly patch pyproject.toml to remove the line containing "setuptools_scm_git_archive".

That module is long deprecated, and its functionality is included in python-setuptools-scm. Also, the module is broken with the upcoming version of python-setuptools-scm 8.x+, already in extra-testing repo.

After making the above change, this package should only have makedepends=python-setuptools-scm.

Bevan commented on 2023-08-31 18:34 (UTC) (edited on 2023-08-31 18:38 (UTC) by Bevan)

Sorry, that comment was premature. As stated earlier in the comments, the version output by "fortls --version" is incorrect without python-setuptools-scm. So that is indeed required as a build dependency. But python-setuptools-scm-git-archive seems unnecessary to me.

Original (wrong) comment: After changing the source to the pypi tarball, neither python-setuptools-scm nor python-setuptools-scm-git-archive are required for me to build this. Just python-setuptools is sufficient.

fosskers commented on 2023-08-29 08:58 (UTC)

My pleasure! This update also fixed the json5 issue that was previously reported.

cphyc commented on 2023-08-29 08:55 (UTC)

Hi @fosskers, works like a charm, thanks for the quick fix!

fosskers commented on 2023-08-29 08:53 (UTC)

Hi @cphyc, thanks for the report. It should be fixed now. Can you confirm?

cphyc commented on 2023-08-29 08:29 (UTC) (edited on 2023-08-29 08:33 (UTC) by cphyc)

The package doesn't build currently and fails with an error about setuptools-scm being unable to detect the version. This can be fixed by using the pypi archive rather than the github one (and updating the hash accordingly) + add python-setuptools-scm-git-archive as a make dependency.

The origin of the issue seems to be that the github archive is missing some metadata that is present in the pypi's tarball. Anyways, the patch below works fine and fortls --version then returns the correct output, i.e. 2.13.0 (as of 29/08/23).

diff --git a/.SRCINFO b/.SRCINFO
index e992f85..c5ab29c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,15 @@
 pkgbase = fortls
        pkgdesc = A modern Language Server for Fortran.
        pkgver = 2.13.0
-       pkgrel = 1
+       pkgrel = 2
        url = https://github.com/gnikit/fortls
        arch = any
        license = MIT
-       depends = python-setuptools
+       makedepends = python-setuptools
+       makedepends = python-setuptools-scm-git-archive
        provides = fortran-language-server
        conflicts = fortran-language-server
-       source = https://github.com/gnikit/fortls/archive/refs/tags/v2.13.0.tar.gz
-       sha256sums = c6973826d60fb92facf3ce4595fce2f5e77c638ced3751e3eb648e23e7a40495
+       source = https://pypi.io/packages/source/f/fortls/fortls-2.13.0.tar.gz
+       sha256sums = 23c5013e8dd8e1d65bf07be610d0827bc48aa7331a7a7ce13612d4c646d0db31

 pkgname = fortls
diff --git a/PKGBUILD b/PKGBUILD
index 393d63b..92a304f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,11 +7,12 @@ pkgdesc="A modern Language Server for Fortran."
 arch=(any)
 url="https://github.com/gnikit/fortls"
 license=("MIT")
-depends=("python-setuptools")
+makedepends=("python-setuptools"
+            "python-setuptools-scm-git-archive")
 provides=("fortran-language-server")
 conflicts=("fortran-language-server")
-source=("https://github.com/gnikit/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
-sha256sums=('c6973826d60fb92facf3ce4595fce2f5e77c638ced3751e3eb648e23e7a40495')
+source=("https://pypi.io/packages/source/f/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('23c5013e8dd8e1d65bf07be610d0827bc48aa7331a7a7ce13612d4c646d0db31')

 build() {
        cd "$pkgname-$pkgver"

fosskers commented on 2022-06-19 17:31 (UTC)

I'm strangely unable to reproduce that, even though I don't have python-json5 installed, but there's something else strange going on involving the package version. The upstream author pushed out updates fairly regularly, so perhaps let's wait for 2.10.0.

ciappi commented on 2022-06-19 12:28 (UTC)

@fosskers, thank for the package. I think you need python-json5 in the dependencies.

fortls --version
Traceback (most recent call last):
  File "/usr/bin/fortls", line 33, in <module>
    sys.exit(load_entry_point('fortls==0.0.0', 'console_scripts', 'fortls')())
  File "/usr/bin/fortls", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/fortls/__init__.py", line 12, in     <module>
    from .langserver import LangServer
  File "/usr/lib/python3.10/site-packages/fortls/langserver.py", line 16, in <module>
    import json5
ModuleNotFoundError: No module named 'json5'

newsboost commented on 2022-06-17 22:24 (UTC)

@fosskers okay, thanks! It's weird it works sometimes, must be a combination of already installed python-packages or cache or something. I think maybe it's safer to grab the files from https://pypi.org/project/fortls/#files - and then maybe (I haven't tested it), we'll have more luck with the dependencies: setuptools_scm_git_archive and maybe setuptools_scm[toml]... I think these are the ones causing the problem, based on the current package source files - although I'm no expert in this field and didn't test it (just read something similar using google, where they also wrote that pypi.org is better)...