summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-django-4.2.27/0001-add-back-setuptools-support.patch179
-rw-r--r--meta-python/recipes-devtools/python/python3-django_4.2.27.bb5
2 files changed, 182 insertions, 2 deletions
diff --git a/meta-python/recipes-devtools/python/python3-django-4.2.27/0001-add-back-setuptools-support.patch b/meta-python/recipes-devtools/python/python3-django-4.2.27/0001-add-back-setuptools-support.patch
new file mode 100644
index 0000000000..907f705e11
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-django-4.2.27/0001-add-back-setuptools-support.patch
@@ -0,0 +1,179 @@
1From 737b87cc374dc0e66fb7dd218848e1a3a0359a6a Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Mon, 19 Jan 2026 14:58:27 +0100
4Subject: [PATCH] add back setuptools support
5
6Starting 4.2.21 the project started to use setuptools build_mets
7build backend, however it requires a much newer setuptools3 package than
8the one provided by oe-core in the Kirkstone branch, and it fails to
9install any files.
10
11This patch reverts partially the commit [1] that added support for
12build_meta backend, and adds back the setuptools support.
13
14[1]: https://github.com/django/django/commit/afe52d89c4f42870622a4bb161ab5f4d4913aac5
15Upstream-Status: Inappropriate [OE-specific, too old Setuptools recipe]
16
17Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
18---
19 extras/Makefile | 9 +++++++
20 setup.cfg | 71 +++++++++++++++++++++++++++++++++++++++++++++++--
21 setup.py | 54 +++++++++++++++++++++++++++++++++++++
22 3 files changed, 132 insertions(+), 2 deletions(-)
23 create mode 100644 extras/Makefile
24 create mode 100644 setup.py
25
26diff --git a/extras/Makefile b/extras/Makefile
27new file mode 100644
28index 0000000..66efd0d
29--- /dev/null
30+++ b/extras/Makefile
31@@ -0,0 +1,9 @@
32+all: sdist bdist_wheel
33+
34+sdist:
35+ python setup.py sdist
36+
37+bdist_wheel:
38+ python setup.py bdist_wheel
39+
40+.PHONY : sdist bdist_wheel
41diff --git a/setup.cfg b/setup.cfg
42index 8bfd5a1..8b0d399 100644
43--- a/setup.cfg
44+++ b/setup.cfg
45@@ -1,4 +1,71 @@
46-[egg_info]
47+[metadata]
48+name = Django
49+version = attr: django.__version__
50+url = https://www.djangoproject.com/
51+author = Django Software Foundation
52+author_email = foundation@djangoproject.com
53+description = A high-level Python web framework that encourages rapid development and clean, pragmatic design.
54+long_description = file: README.rst
55+license = BSD-3-Clause
56+classifiers =
57+ Development Status :: 5 - Production/Stable
58+ Environment :: Web Environment
59+ Framework :: Django
60+ Intended Audience :: Developers
61+ License :: OSI Approved :: BSD License
62+ Operating System :: OS Independent
63+ Programming Language :: Python
64+ Programming Language :: Python :: 3
65+ Programming Language :: Python :: 3 :: Only
66+ Programming Language :: Python :: 3.8
67+ Programming Language :: Python :: 3.9
68+ Programming Language :: Python :: 3.10
69+ Programming Language :: Python :: 3.11
70+ Programming Language :: Python :: 3.12
71+ Topic :: Internet :: WWW/HTTP
72+ Topic :: Internet :: WWW/HTTP :: Dynamic Content
73+ Topic :: Internet :: WWW/HTTP :: WSGI
74+ Topic :: Software Development :: Libraries :: Application Frameworks
75+ Topic :: Software Development :: Libraries :: Python Modules
76+project_urls =
77+ Documentation = https://docs.djangoproject.com/
78+ Release notes = https://docs.djangoproject.com/en/stable/releases/
79+ Funding = https://www.djangoproject.com/fundraising/
80+ Source = https://github.com/django/django
81+ Tracker = https://code.djangoproject.com/
82+
83+[options]
84+python_requires = >=3.8
85+packages = find:
86+include_package_data = true
87+zip_safe = false
88+install_requires =
89+ asgiref >= 3.6.0, < 4
90+ backports.zoneinfo; python_version<"3.9"
91+ sqlparse >= 0.3.1
92+ tzdata; sys_platform == 'win32'
93+
94+[options.entry_points]
95+console_scripts =
96+ django-admin = django.core.management:execute_from_command_line
97+
98+[options.extras_require]
99+argon2 = argon2-cffi >= 19.1.0
100+bcrypt = bcrypt
101+
102+[flake8]
103+exclude = build,.git,.tox,./tests/.env
104+extend-ignore = E203
105+max-line-length = 88
106+per-file-ignores =
107+ django/core/cache/backends/filebased.py:W601
108+ django/core/cache/backends/base.py:W601
109+ django/core/cache/backends/redis.py:W601
110+ tests/cache/tests.py:W601
111+
112+[isort]
113+profile = black
114+default_section = THIRDPARTY
115+known_first_party = django[egg_info]
116 tag_build =
117 tag_date = 0
118-
119diff --git a/setup.py b/setup.py
120new file mode 100644
121index 0000000..f0e82b7
122--- /dev/null
123+++ b/setup.py
124@@ -0,0 +1,55 @@
125+import os
126+import site
127+import sys
128+from distutils.sysconfig import get_python_lib
129+
130+from setuptools import setup
131+
132+# Allow editable install into user site directory.
133+# See https://github.com/pypa/pip/issues/7953.
134+site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
135+
136+# Warn if we are installing over top of an existing installation. This can
137+# cause issues where files that were deleted from a more recent Django are
138+# still present in site-packages. See #18115.
139+overlay_warning = False
140+if "install" in sys.argv:
141+ lib_paths = [get_python_lib()]
142+ if lib_paths[0].startswith("/usr/lib/"):
143+ # We have to try also with an explicit prefix of /usr/local in order to
144+ # catch Debian's custom user site-packages directory.
145+ lib_paths.append(get_python_lib(prefix="/usr/local"))
146+ for lib_path in lib_paths:
147+ existing_path = os.path.abspath(os.path.join(lib_path, "django"))
148+ if os.path.exists(existing_path):
149+ # We note the need for the warning here, but present it after the
150+ # command is run, so it's more likely to be seen.
151+ overlay_warning = True
152+ break
153+
154+
155+setup()
156+
157+
158+if overlay_warning:
159+ sys.stderr.write(
160+ """
161+
162+========
163+WARNING!
164+========
165+
166+You have just installed Django over top of an existing
167+installation, without removing it first. Because of this,
168+your install may now include extraneous files from a
169+previous version that have since been removed from
170+Django. This is known to cause a variety of problems. You
171+should manually remove the
172+
173+%(existing_path)s
174+
175+directory and re-install Django.
176+
177+"""
178+ % {"existing_path": existing_path}
179+ )
diff --git a/meta-python/recipes-devtools/python/python3-django_4.2.27.bb b/meta-python/recipes-devtools/python/python3-django_4.2.27.bb
index 32fd235937..fba21cd75f 100644
--- a/meta-python/recipes-devtools/python/python3-django_4.2.27.bb
+++ b/meta-python/recipes-devtools/python/python3-django_4.2.27.bb
@@ -1,7 +1,8 @@
1require python-django.inc 1require python-django.inc
2#From 4.2.22 onwards setuptools configuration migrated to pyproject.toml
3inherit pypi python_setuptools_build_meta
4 2
3inherit pypi setuptools3
4
5SRC_URI += "file://0001-add-back-setuptools-support.patch"
5SRC_URI[sha256sum] = "b865fbe0f4a3d1ee36594c5efa42b20db3c8bbb10dff0736face1c6e4bda5b92" 6SRC_URI[sha256sum] = "b865fbe0f4a3d1ee36594c5efa42b20db3c8bbb10dff0736face1c6e4bda5b92"
6 7
7RDEPENDS:${PN} += "\ 8RDEPENDS:${PN} += "\