Skip to content

Module naming scheme OPTIONS and the emacs package #2884

@TheQueasle

Description

@TheQueasle

Playing around with the modules.yaml feature and setting

naming_scheme: '${PACKAGE}/${PACKAGE}-${VERSION}-${OPTIONS}-${COMPILERNAME}-${COMPILERVER}'

It leads to emacs with the following name emacs/emacs-25.1?toolkit=gtk?-gcc-4.8.5:

[vagrant@sandbox ~]$ module avail emacs

-------------- /vagrant/spack/share/spack/modules/linux-centos7-x86_64 --------------
emacs/emacs-25.1?toolkit=gtk?-gcc-4.8.5
[vagrant@sandbox ~]$ cd /vagrant/spack/share/spack/modules/linux-centos7-x86_64/emacs/
[vagrant@sandbox emacs]$ ls -l
total 4
-rw-r--r-- 1 vagrant vagrant 974 Jan 23 10:22 emacs-25.1 toolkit=gtk -gcc-4.8.5

Very quick guess, it's because spec.variants['toolkit'].value is one of gtk or athena and not True or False?

        toolkit = spec.variants['toolkit'].value
        if '+X' in spec:
            if toolkit not in ('gtk', 'athena'):
                raise InstallError("toolkit must be in (gtk, athena), not %s" %
                                   toolkit)
            args = [
                '--with-x',
                '--with-x-toolkit={0}'.format(toolkit)
            ]
        else:
            args = ['--without-x']

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions