1

I have a project that is mostly Python code but also contains some HTML, JavaScript, and CSS. Depending on the build-target, some things have to be configured across the source files (e.g. some values for constants).

Is there a nice tool/technique that allows me to configure Python, JavaScript, and CSS with one configuration file upon build time? The configurations I'm talking about are merely string substitutions and nothing fancy.

Since the project is mostly Python code, I'd probably prefer to use ini-style configuration files and ConfigParser for Python, and re-use the configuration file for the rest of the source files as well.

1
  • Puppet/Ansible/Salt let you configure multiple things using one central place. They're more "deployment" tools than build tools though and may be too heavyweight for your needs. Commented Jul 7, 2015 at 8:15

1 Answer 1

1

Looks like Cmake and the configure_file command come pretty close to my requirements. Together with out-of-source builds it is pretty easy to deploy different configurations in different directories. It does not use ini-stytle configuration files, though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.