Skip to content

Non-numeric version numbers don't work in packages.yaml #1557

@citibeth

Description

@citibeth

I have the following package ibmisc:

class Ibmisc(CMakePackage):
    """Misc. reusable utilities used by IceBin."""

    homepage = "https://github.com/citibeth/ibmisc"
    url      = "https://github.com/citibeth/ibmisc/tarball/v0.1.0"

    version('0.1.2', '3a6acd70085e25f81b63a7e96c504ef9')
    version('0.1.1', '1bca77795cca96c583dcf75a0c666552')
    version('0.1.0', '058af1c774b5836a1a71fd10611d80b5')

    version('develop',
        git='https://github.com/citibeth/ibmisc.git',
        branch='develop')
...

I then add to packages.yaml:

    ibmisc:
        version: [9999]
        variants: +python +netcdf

Now try spack spec ibmisc, and I get:

[email protected]%[email protected]+blitz+boost~everytrace+googletest+netcdf+proj+python+udunits2 arch=linux-centos7-x86_64

I can work around this by adopting (arcane) conventions that certain numeric version numbers mean certain things. For example, if I search-and-replace develop --> 9999 in the above package.py and packages.yaml, then spack spec ibmisc yields my development version:

ibmisc@9999%[email protected]+blitz+boost~everytrace+googletest+netcdf+proj+python+udunits2 arch=linux-centos7-x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions