community/py3-django-oscar: upgrade to 3.2.5

This commit is contained in:
Kaarle Ritvanen 2024-12-04 17:01:38 +02:00
parent 3ece572f67
commit 90b2ca77c1
2 changed files with 41 additions and 5 deletions

View File

@ -0,0 +1,34 @@
From ee647a99f8b6a7aad1e49520127ded97639676ea Mon Sep 17 00:00:00 2001
From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Date: Tue, 10 Dec 2024 12:39:07 +0200
Subject: [PATCH] setup: make npm build optional
The distribution package does not contain package.json nor gulpfile.js
and ideally would not depend on access to the npm registry.
---
setup.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 89a21019a..dfe95ba73 100755
--- a/setup.py
+++ b/setup.py
@@ -22,8 +22,13 @@ from oscar import get_version # noqa isort:skip
class BuildNPM(build_module.build):
def run(self):
- subprocess.check_call(["npm", "install"])
- subprocess.check_call(["npm", "run", "build"])
+ try:
+ os.stat(os.path.join(PROJECT_DIR, "package.json"))
+ except FileNotFoundError:
+ pass
+ else:
+ subprocess.check_call(["npm", "install"])
+ subprocess.check_call(["npm", "run", "build"])
super().run()
--
2.47.1

View File

@ -1,8 +1,8 @@
# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
# Maintainer: Kaarle Ritvanen <kunkku@alpinelinux.org>
pkgname=py3-django-oscar
pkgver=3.2.4
pkgrel=1
pkgver=3.2.5
pkgrel=0
pkgdesc="Domain-driven e-commerce for Django"
url="http://oscarcommerce.com/"
arch="noarch"
@ -13,9 +13,10 @@ depends="py3-babel py3-django py3-django-extra-views py3-django-haystack
py3-factory-boy py3-pillow py3-purl"
makedepends="gettext py3-setuptools"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/d/django-oscar/django-oscar-$pkgver.tar.gz
source="https://files.pythonhosted.org/packages/source/d/django_oscar/django_oscar-$pkgver.tar.gz
0001-setup-make-npm-build-optional.patch
"
builddir="$srcdir/django-oscar-$pkgver"
builddir="$srcdir/django_oscar-$pkgver"
replaces="py-django-oscar" # Backwards compatibility
provides="py-django-oscar=$pkgver-r$pkgrel" # Backwards compatibility
@ -38,5 +39,6 @@ package() {
}
sha512sums="
52cadae438f036c644a2fe3a155a5041e81f8c834786982c6200e9f59a02f1c5b52bd22e063e033e273bbff5da6adb5b3745e2c1d3ac27d2888d800bbedbe85a django-oscar-3.2.4.tar.gz
25d6305070f327335e0d46be29f9ca5d40cfeb909fba8e11156739975f0669b3208365209370ecfb784e3e6c5fadeea84b130092862eb50516b715d911f28078 django_oscar-3.2.5.tar.gz
d0f563b9c5b8e8372a59f06ba607e0a2c63fceb400e2279c00be7adf969a0813dc3173cf335b4540c25e95004f37df0d9b5929f92c42c3fbf5026829f5e24418 0001-setup-make-npm-build-optional.patch
"