3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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.
This commit is contained in:
Efraim Flashner 2020-09-01 15:40:03 +03:00
parent e8ae96ae61
commit 04b5fb9262
Signed by untrusted user: efraim
GPG key ID: 41AAE7DCCA3D8351

View file

@ -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