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

fosskers commented on 2022-06-17 21:29 (UTC)

@newsboost I had noticed this before and opened this issue on the main repo: https://github.com/gnikit/fortls/issues/117

You're right that I'd have to package this is a different way in order to get the proper version number.

newsboost commented on 2022-06-17 21:19 (UTC) (edited on 2022-06-17 21:29 (UTC) by newsboost)

Hi, I have some issues on one pc (not the other): After I install this package and run "fortls --version" the output is "0.0.0" instead of "2.9.0". I've been looking into this for a VERY long time and also googled "arch linux setuptools version 0.0.0" in order to find an explanation. I think either you should grab the source files from https://pypi.org/project/fortls/#files instead of from github, because instead of "version.py" this includes "_version.py", which is a file generated by setuptools_scm (it says: "don't change, don't track in version control" + version = '2.9.0'). So when you grab the source from github, you're missing the version-number (and a fortls.egg-info directory which I don't know what is used for). If I do "yay -S python-setuptools-scm" then I cannot install it:

==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
Traceback (most recent call last):
  File "/home/user/.cache/yay/fortls/src/fortls-2.9.0/setup.py", line 7, in <module>
    setuptools.setup()
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 109, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 462, in __init__
    _Distribution.__init__(
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 886, in finalize_options
    ep(self)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 104, in infer_version
    _assign_version(dist, config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
    _version_missing(config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/user/.cache/yay/fortls/src/fortls-2.9.0.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: fortls

If I do "yay -Rns python-setuptools-scm", then I can install it - but the version number becomes 0.0.0. If we look in the pyproject.toml file it says "setuptools_scm" & "setuptools_scm_git_archive" are dependencies. I'm so lucky that I happen to have an old pc which it installed fine on without these dependencies - and the right version number. But what is actually going on? These 2 lines output 2 completely different things on the two machines:

 >>> from importlib.metadata import version
 >>> print(version('fortls'))

I think it's safer if you grab the packages from pypi.org instead of from github or what do you think about this (there might be another solution, I however cannot really understand this difference or behaviour)?