[GRASS-git] [OSGeo/grass] 90a26d: build: refactor grass.py in preparation for FHS (#...

Nicklas Larsson noreply at github.com
Mon Jul 7 00:10:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 90a26d74906b63ecca279c7215d3ef586551f71c
      https://github.com/OSGeo/grass/commit/90a26d74906b63ecca279c7215d3ef586551f71c
  Author: Nicklas Larsson <n_larsson at yahoo.com>
  Date:   2025-07-07 (Mon, 07 Jul 2025)

  Changed paths:
    M CMakeLists.txt
    M cmake/modules/GRASSInstallDirs.cmake
    M cmake/modules/copy_python_files_in_subdir.cmake
    M include/Make/Install.make
    M lib/init/CMakeLists.txt
    M lib/init/Makefile
    M lib/init/grass.py
    M python/grass/CMakeLists.txt
    M python/grass/app/Makefile
    A python/grass/app/resource_paths.py
    M python/grass/app/runtime.py

  Log Message:
  -----------
  build: refactor grass.py in preparation for FHS (#5933)

The transitional period from the traditional GRASS installation
structure to a Filesystem Hierarchy Standard (FHS) complying structure
(enabled by CMake build) requires an alternative way to find resources.
Currently all resources are located in relation to GISBASE. That is no
longer the case with a FHS installation.

In addition, and instead of GISBASE, a number of environment
variables will be needed. Setting up all these variables would bloat
the grass.py file, therefore this update moves this to the grass.app
Python module.

Summary of changes:

- python/grass/app/resource_paths.py is a configurable file, where 
  default installation paths to resources are configured as well as
  other build time properties
- to simplify Conda adoption, the variable GRASS_PREFIX is added, which
  is essentially equal to installation prefix, but easily changeable
  if needed.
- grass.py need to find the Python module to be able to set necessary
  variables, a new variable GRASS_PYDIR is configured into the file to
  do just this.
- update copy_python_files_in_subdir.cmake to be able to exclude files



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list