# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1347821016 -7200
# Node ID 47f8580408f6f3085905cc68c22d67acb53858ba
# Parent 4e31399e39e2f4173429e84644eb003ed7885cfa
sage-location: add write_config_files()
diff --git a/sage-location b/sage-location
a
|
b
|
|
215 | 215 | pass |
216 | 216 | |
217 | 217 | |
| 218 | def write_config_files(): |
| 219 | """ |
| 220 | Write various configuration files which contain the ``SAGE_ROOT`` |
| 221 | path. |
| 222 | """ |
| 223 | # Currently only one file (for the experimental package qepcad): |
| 224 | # $SAGE_ROOT/local/default.qepcadrc |
| 225 | f = open(os.path.join(SAGE_LOCAL, 'default.qepcadrc'), 'w') |
| 226 | text = \ |
| 227 | """# THIS FILE IS AUTOMATICALLY GENERATED by sage-location -- DO NOT EDIT |
| 228 | |
| 229 | ##################################################### |
| 230 | # QEPCAD rc file. |
| 231 | # This file allows for some customization of QEPCAD. |
| 232 | # Right now, the ability to give a path to Singular, |
| 233 | # so that it gets used for some computer algebra |
| 234 | # computations is the only feature. |
| 235 | ##################################################### |
| 236 | SINGULAR %s |
| 237 | """ % os.path.join(SAGE_LOCAL, 'bin') |
| 238 | |
| 239 | f.write(text) |
| 240 | f.close() |
| 241 | |
| 242 | |
218 | 243 | def remove_files(path, remove_extensions): |
219 | 244 | """ |
220 | 245 | Walk the tree starting at ``path``, and remove all files with |
… |
… |
|
245 | 270 | update_library_files() |
246 | 271 | update_pkgconfig_files() |
247 | 272 | make_scripts_relative() |
| 273 | write_config_files() |
248 | 274 | |
249 | 275 | # Compiled python files need to be regenerated, so we remove them: |
250 | 276 | remove_files(os.path.join(SAGE_LOCAL, 'lib', 'python'), |