Package Details: python-django-cors-headers 4.3.1-1

Git Clone URL: https://aur.archlinux.org/python-django-cors-headers.git (read-only, click to copy)
Package Base: python-django-cors-headers
Description: Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS)
Upstream URL: http://github.com/ottoyiu/django-cors-headers
Submitter: portaloffreedom
Maintainer: razer
Last Packager: razer
Votes: 7
Popularity: 0.43
First Submitted: 2015-03-07 16:04 (UTC)
Last Updated: 2023-11-25 06:50 (UTC)

Latest Comments

1 2 Next › Last »

hashworks commented on 2023-11-24 16:29 (UTC)

Fix: _pypi_pkgname=django-cors-headers

pipep commented on 2023-11-23 19:35 (UTC)

I get an error upgrading from 4.3.0 to 4.3.1:

==> Retrieving sources...
  -> Downloading django_cors_headers-4.3.1.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122  100   122    0     0   1698      0 --:--:-- --:--:-- --:--:--  1718
100   298  100   298    0     0   2012      0 --:--:-- --:--:-- --:--:--  2012
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
==> ERROR: Failure while downloading https://pypi.io/packages/source/d/django_cors_headers/django_cors_headers-4.3.1.tar.gz
    Aborting...
 -> error making: python-django-cors-headers-exit status 1
 -> Failed to install the following packages. Manual intervention is required:
python-django-cors-headers - exit status 1

hashworks commented on 2023-08-30 18:22 (UTC)

Please place the upstream license in /usr/share/licenses, not in /usr/share/license.

razer commented on 2023-03-16 06:05 (UTC)

thanks szanko

SZanko commented on 2023-03-15 17:04 (UTC)

Here is a patch to package this project without setup.py

diff --git a/PKGBUILD b/PKGBUILD
index 8097169..1550a1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,32 @@
 # Maintainer: Tom Hacohen <tom@stosb.com>
 # Past Maintainer: Miguel de Val-Borro <miguel at archlinux dot net>
+# Contributor: SZanko, szanko at protonmail dot com

 pkgname=python-django-cors-headers
 _pypi_pkgname=django_cors_headers
 pkgver=3.14.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Django application for handling the server headers required for Cross-Origin Resource Sharing (CORS)"
 arch=('any')
 url="http://github.com/ottoyiu/django-cors-headers"
 depends=('python-django')
-makedepends=('python-setuptools')
+makedepends=(
+  'python-build'
+  'python-installer'
+  'python-wheel'
+  'python-setuptools-scm'
+)
 source=("https://pypi.io/packages/source/d/${_pypi_pkgname}/${_pypi_pkgname}-${pkgver}.tar.gz")
 sha256sums=('5fbd58a6fb4119d975754b2bc090f35ec160a8373f276612c675b00e8a138739')

 build() {
   cd ${srcdir}/${_pypi_pkgname}-${pkgver}
-  python setup.py build
+  python -m build --wheel --no-isolation
 }

 package() {
   cd ${srcdir}/${_pypi_pkgname}-${pkgver}
-  python setup.py install --prefix=/usr --root=${pkgdir}
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm644 -t "$pkgdir/usr/share/license/$pkgname" LICENSE
 }

razer commented on 2023-03-14 11:06 (UTC)

I have the same problem on several pypi packages. Seems like setuptools turns obsolete since a lot of maintainer choose tu use pip. Problem is I don't found any way to build it directly from sources. Help required then

bezerkk commented on 2023-03-14 10:32 (UTC) (edited on 2023-03-14 10:34 (UTC) by bezerkk)

==> Extracting sources... -> Extracting django_cors_headers-3.14.0.tar.gz with bsdtar ==> Sources are ready. ==> Making package: python-django-cors-headers 3.14.0-1 (tis 14 mar 2023 11:25:27) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> WARNING: Using existing $srcdir/ tree ==> Starting build()... python: can't open file '/home/xxxx/.cache/yay/python-django-cors-headers/src/django_cors_headers-3.14.0/setup.py': [Errno 2] No such file or directory ==> ERROR: A failure occurred in build(). Aborting... -> error making: python-django-cors-headers

eomanis commented on 2020-01-20 22:38 (UTC) (edited on 2020-01-21 19:44 (UTC) by eomanis)

Version 2.4.0 appears to be incompatible with python-django-3.0.2; it seems to rely on legacy Django API that was removed in the transition from Django 2 to Django 3. This appears to be the cause of the error mentioned by Smasher816, see also this Stack Overflow thread.

Can anyone update it to the current version 3.2.1? It would require these changes to the PKGBUILD:

_name="django-cors-headers"
pkgname="python-${_name}"
pkgver=3.2.1
(...)
url="https://github.com/adamchainz/django-cors-headers"
(...)
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha384sums=('8e90b71b19fa32cead1272c352a0fac0a377d30424525d264bfd928def2c9fa58b9e5af4b627b9bfe949df4b1cbe5382')

With this, etesync-server-0.2.2-1 works again for me.

Smasher816 commented on 2020-01-19 05:39 (UTC) (edited on 2020-01-19 05:40 (UTC) by Smasher816)

Looks like it needs to be updated to use the new django.

python[2749752]: File "/usr/lib/python3.8/site-packages/corsheaders/init.py", line 1, in <module>

python[2749752]: from .checks import check_settings # noqa: F401

python[2749752]: File "/usr/lib/python3.8/site-packages/corsheaders/checks.py", line 8, in <module>

python[2749752]: from django.utils import six

python[2749752]: ImportError: cannot import name 'six' from 'django.utils' (/usr/lib/python3.8/site-packages/django/utils/init.py)

arthru commented on 2018-07-27 12:47 (UTC)

just updated to 2.4.0