Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle interactive configure? #7983

Closed
weijianwen opened this issue May 3, 2018 · 3 comments
Closed

How to handle interactive configure? #7983

weijianwen opened this issue May 3, 2018 · 3 comments
Labels

Comments

@weijianwen
Copy link
Contributor

Some package, for example WRF requires answering questions interactively during ./configure to generate a proper config file. EasyBuild 'emulates' to answer questions during configure http://easybuild.readthedocs.io/en/latest/Typical_workflow_example_with_WRF.html . I wonder how to do it in Spack.

@adamjstewart
Copy link
Member

Ah, the dreaded WRF. There are a few packages in Spack similar to this. Check out fpc, ncl, perl-bio-perl, perl-io-socket-ssl, perl-net-ssleay, repeatmasker, and snphylo. If you think there is too much repeated code here, we could consider adding a base class for interactively installed programs.

Aside from that, I like to see how other package managers install it.

Homebrew

This looks too simple to actually work...

https://github.com/csdms/homebrew-models/blob/master/wrf.rb

EasyBuild

It looks like there are some environment variables you can set, but you still need a way of answering questions interactively.

https://github.com/easybuilders/easybuild-easyblocks/blob/master/easybuild/easyblocks/w/wrf.py

@citibeth
Copy link
Member

citibeth commented May 5, 2018

Here's another on that I did in Spack:
https://github.com/citibeth/spack/edit/efischer/180422-GALAHAD/var/spack/repos/builtin/packages/galahad/package.py?pr=/spack/spack/pull/7864

        with open('build_input.txt', 'w') as fout:
            fout.write('y3\nc\n6\n2\nn2\nn3\nnyydydy')
            fout.write('\n')

        install_optsuite = Executable(os.path.join(
            spec['archdefs-src'].prefix, 'install_optsuite'))

        with open('build_input.txt', 'r') as fin:
            try:
                install_optsuite(input=fin)
            except Exception as e:
                tty.warn('Ignoring error while building' +
                         ' (this is normal): %s' % str(e))

@MichaelLaufer
Copy link
Contributor

This has been resolved in the WRF Spack package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants