* [bug#56542] [PATCH] gnu: Add python-django-cleanup.
@ 2022-07-13 16:50 Luis Felipe via Guix-patches via
2022-08-22 20:39 ` Luis Felipe via Guix-patches via
2022-08-29 15:59 ` bug#56542: " Marius Bakke
0 siblings, 2 replies; 3+ messages in thread
From: Luis Felipe via Guix-patches via @ 2022-07-13 16:50 UTC (permalink / raw)
To: 56542
[-- Attachment #1.1: Type: text/plain, Size: 92 bytes --]
Hi, a new package here.
---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-django-cleanup.patch --]
[-- Type: text/x-patch; filename="0001-gnu-Add-python-django-cleanup.patch"; name="0001-gnu-Add-python-django-cleanup.patch", Size: 2904 bytes --]
From 16f5e77b90c262e672ac7c32b25911518a4f1743 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Wed, 13 Jul 2022 11:23:02 -0500
Subject: [PATCH] gnu: Add python-django-cleanup.
* gnu/packages/django.scm (python-django-cleanup): New variable.
---
gnu/packages/django.scm | 51 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index b32faab183..7f2783d071 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -1361,3 +1361,54 @@ (define-public python-django-svg-image-form-field
models that use Django's standard @code{ImageField}, in addition to the
image files already supported by it.")
(license license:expat)))
+
+(define-public python-django-cleanup
+ (package
+ (name "python-django-cleanup")
+ (version "6.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/un1t/django-cleanup")
+ (commit (string-append version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0c1nghn1bnlq0a4d3sy3s363ksqsnxksixbimdy3cc6a0vk4sjps"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests-settings
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; django-cleanup optionally integrates with
+ ;; sorl-thumbnail, which is not available in Guix yet, so
+ ;; this patch comments it out to avoid import failures in
+ ;; test settings.
+ (substitute* "django_cleanup/testapp/settings.py"
+ (("'sorl\\.thumbnail',") "# 'sorl.thumbnail',"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ ;; Add CWD to PYTHONPATH so that the tests can find the
+ ;; testapp package in the source.
+ (setenv "PYTHONPATH" (getcwd))
+ (invoke "pytest")))))))
+ (native-inputs
+ (list ;; python-django-sorl-thumbnail ; TODO: Add to Guix.
+ python-easy-thumbnails
+ python-pillow
+ python-pytest
+ python-pytest-cov
+ python-pytest-django
+ python-pytest-xdist))
+ (propagated-inputs
+ (list python-django))
+ (home-page "https://github.com/un1t/django-cleanup")
+ (synopsis "Automatically deletes unused media files")
+ (description "This application automatically deletes user-uploaded
+files when a model is modified or deleted. It works for FileField,
+ImageField and their subclasses. Files set as default values for any
+FileField are not deleted.")
+ (license license:expat)))
--
2.36.1
[-- Attachment #1.3: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1815 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#56542] [PATCH] gnu: Add python-django-cleanup.
2022-07-13 16:50 [bug#56542] [PATCH] gnu: Add python-django-cleanup Luis Felipe via Guix-patches via
@ 2022-08-22 20:39 ` Luis Felipe via Guix-patches via
2022-08-29 15:59 ` bug#56542: " Marius Bakke
1 sibling, 0 replies; 3+ messages in thread
From: Luis Felipe via Guix-patches via @ 2022-08-22 20:39 UTC (permalink / raw)
To: 56542@debbugs.gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 12 bytes --]
Ping ◠ ◯
[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#56542: [PATCH] gnu: Add python-django-cleanup.
2022-07-13 16:50 [bug#56542] [PATCH] gnu: Add python-django-cleanup Luis Felipe via Guix-patches via
2022-08-22 20:39 ` Luis Felipe via Guix-patches via
@ 2022-08-29 15:59 ` Marius Bakke
1 sibling, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2022-08-29 15:59 UTC (permalink / raw)
To: Luis Felipe, 56542-done
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
Luis Felipe via Guix-patches via <guix-patches@gnu.org> skriver:
> Hi, a new package here.
[...]
> * gnu/packages/django.scm (python-django-cleanup): New variable.
Applied, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-29 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 16:50 [bug#56542] [PATCH] gnu: Add python-django-cleanup Luis Felipe via Guix-patches via
2022-08-22 20:39 ` Luis Felipe via Guix-patches via
2022-08-29 15:59 ` bug#56542: " Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.