diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-09-01 15:40:03 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-09-01 15:46:53 +0300 |
commit | 04b5fb926289f6e234f26d3c24280f2f6aaaea75 (patch) | |
tree | d91091fc9c90b00ccb2b69353ad66f4d4ca60481 /gnu/packages | |
parent | e8ae96ae61d125940d832df5c898bec307109f83 (diff) |
gnu: python-efl: Use regex to delete cythonized files.
* gnu/packages/enlightenment.scm (python-efl)[source]: Adjust snippet to
delete cythonized files based on a regex pattern.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/enlightenment.scm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index cb72f3bad0..16e9dcb807 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -402,13 +402,15 @@ embedded systems.") (modules '((guix build utils))) ;; Remove files generated by Cython (snippet - '(begin - (copy-file "efl/dbus_mainloop/e_dbus.c" "efl/dbus_mainloop/e_dbus.q") - (for-each delete-file (find-files "efl" ".*\\.c$")) - (delete-file "efl/eo/efl.eo_api.h") - (copy-file "efl/dbus_mainloop/e_dbus.q" "efl/dbus_mainloop/e_dbus.c") - (delete-file "efl/dbus_mainloop/e_dbus.q") - #t)))) + '(begin + (for-each (lambda (file) + (let ((generated-file + (string-append (string-drop-right file 3) "c"))) + (when (file-exists? generated-file) + (delete-file generated-file)))) + (find-files "efl" "\\.pyx$")) + (delete-file "efl/eo/efl.eo_api.h") + #t)))) (build-system python-build-system) (arguments '(#:phases |