Created
May 11, 2011 07:05
-
-
Save arterrey/966029 to your computer and use it in GitHub Desktop.
A buildout to build a perl interpreter with modules installed with CPAN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
parts = | |
perl | |
perl-modules-install | |
[perl] | |
recipe = hexagonit.recipe.cmmi | |
url = http://www.cpan.org/src/perl-5.12.3.tar.gz | |
configure-command = | |
sh Configure \ | |
-Dprefix=${buildout:directory}/parts/${:_buildout_section_name_} \ | |
-Dlibs='-ldl -lm -lpthread -lc -lcrypt' \ | |
-des | |
interpreter = ${buildout:directory}/parts/${:_buildout_section_name_}/bin/perl | |
[perl-modules-install-gen] | |
recipe = mr.scripty | |
# Python list of modules to install | |
MODULES = ["Date::Format", "Text::CSV_XS" ] | |
install_cmds = | |
... | |
... # Construct CPAN install command for each module | |
... commands = ["${perl:interpreter} -MCPAN -e \"install %s\";\n" % m for m in ${:MODULES}] | |
... | |
... # Auto answer the first 21 questions given by CPAN installer | |
... commands = ["echo \"" + ('\n'*21) + "\" + | " + c for c in commands] | |
... | |
... return ''.join (commands) | |
[perl-modules-install] | |
recipe = iw.recipe.cmd | |
on_install = True | |
on_update = False | |
cmds = ${perl-modules-install-gen:install_cmds} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment