代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/python-django 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%bcond_with python_bootstrap
%bcond_with doc
Summary: A high-level Python Web framework
Name: python-django
Version: 5.2.7
Release: 3%{?dist}
License: BSD
URL: https://www.djangoproject.com/
Source0: https://github.com/django/django/archive/refs/tags/django-%{version}.tar.gz
%define pyproject_build /usr/bin/python3 -mpip wheel --verbose --progress-bar off --disable-pip-version-check --use-pep517 --no-build-isolation --no-deps --wheel-dir ./pyproject-wheeldir .
Patch001: python-django-5.2.7-CVE-2025-64458.patch
Patch002: python-django-5.2.7-CVE-2025-64459.patch
Patch003: python-django-5.2.7-CVE-2025-64460.patch
Patch004: python-django-5.2.7-CVE-2025-13372.patch
BuildArch: noarch
%description
Django is a high-level Python web framework that encourages rapid development
and clean, pragmatic design. Built by experienced developers, it takes care of
much of the hassle of web development, so you can focus on writing your app
without needing to reinvent the wheel. It’s free and open source.
%package bash-completion
Summary: Bash completion files for Django
BuildRequires: bash-completion
Requires: bash-completion
%description bash-completion
This package contains the Bash completion files form Django high-level
Python Web framework.
%if %{with doc}
%package -n python3-django-doc
Summary: Documentation for Django
BuildRequires: make
Suggests: python3-django = %{version}-%{release}
%description -n python3-django-doc
This package contains the documentation for the Django high-level
Python Web framework.
%endif
%package -n python3-django
Summary: A high-level Python Web framework
BuildRequires: python3-devel python3-setuptools python3-pytz python3-sqlparse python-selenium python3-sphinx
BuildRequires: /usr/bin/pathfix.py python3-asgiref
BuildRequires: python3-pip python3-wheel
Requires: python3-pytz python3-sqlparse python3-argon2-cffi python3-bcrypt
Provides: python-Django, python3-django
%description -n python3-django
Django is a high-level Python web framework that encourages rapid development
and clean, pragmatic design. Built by experienced developers, it takes care of
much of the hassle of web development, so you can focus on writing your app
without needing to reinvent the wheel. It’s free and open source.
%prep
%autosetup -n django-%{version} -p1
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" .
%build
%pyproject_build
%install
%pyproject_install
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}/usr/lib/python%{python3_version}/site-packages/django/conf/project_template/manage.py-tpl
%if %{with doc}
(cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html)
cp -ar docs ..
%endif
mkdir -p %{buildroot}%{_mandir}/man1/
cp -p docs/man/* %{buildroot}%{_mandir}/man1/
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
mkdir -p %{buildroot}$bashcompdir
install -m 0644 -p extras/django_bash_completion \
%{buildroot}$bashcompdir/django-admin.py
for file in django-admin django-admin-3 django-admin-%{python3_version} python3-django-admin manage.py ; do
ln -s django-admin.py %{buildroot}$bashcompdir/$file
done
ln -s ./django-admin %{buildroot}%{_bindir}/django-admin-3
ln -s ./django-admin %{buildroot}%{_bindir}/django-admin-%{python3_version}
ln -s ./django-admin %{buildroot}%{_bindir}/python3-django-admin
find %{buildroot} -name "*.po" -delete
%check
cd %{_builddir}/django-%{version}
export PYTHONPATH="$(pwd):%{?with_python_bootstrap:$PYTHONPATH}"
cd tests
# 系统内 python 版本无此解析问题
sed -i "s/htmlparser_fixed =.*/htmlparser_fixed = True/" utils_tests/test_html.py
python3 runtests.py --settings=test_sqlite --verbosity=2 --parallel 1
%files bash-completion
%{_datadir}/bash-completion
%if %{with doc}
%files -n python3-django-doc
%doc docs/_build/html/*
%endif
%files -n python3-django
%license LICENSE
%doc AUTHORS README.rst
%{_bindir}/django-admin
%{_bindir}/django-admin-3
%{_bindir}/django-admin-%{python3_version}
%{_bindir}/python3-django-admin
%{python3_sitelib}/*
%{_mandir}/man1/django-admin.1*
%changelog
* Thu Dec 04 2025 Shop You <shopyou@tencent.com> - 5.2.7-3
- [Type] security
- [DESC] Fix CVE-2025-64460 and CVE-2025-13372
* Mon Nov 10 2025 Shop You <shopyou@tencent.com> - 5.2.7-2
- [Type] security
- [DESC] Fix CVE-2025-64458 and CVE-2025-64459
* Thu Oct 9 2025 bbrucezhang <bbrucezhang@tencent.com> - 5.2.7-1
- [Type] security
- [DESC] Update to 5.2.7 for fix CVE-2025-57833 and CVE-2024-56374
* Sat Jun 21 2025 Wseelly <hiw8508@foxmail.com> - 5.0.8-4
- [Type] security
- [DESC] Resolves: CVE-2025-26699
* Thu Dec 12 2024 Shop You <shopyou@tencent.com> - 5.0.8-3
- [Type] security
- [DESC] Resolves: CVE-2024-45230 CVE-2024-45231 CVE-2024-53908 CVE-2024-53907
* Thu Sep 26 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 5.0.8-2
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Tue Aug 20 2024 Shop You <shopyou@tencent.com> - 5.0.8-1
- [Type] security
- [DESC] Resolves: CVE-2024-41989 CVE-2024-41990 CVE-2024-41991 CVE-2024-42005
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.2.24-3
- Rebuilt for loongarch release
* Tue Jul 16 2024 Shop You <shopyou@tencent.com> - 3.2.24-2
- [Type] security
- [DESC] Resolves: CVE-2024-27351
* Sun Apr 07 2024 Shop You <shopyou@tencent.com> - 3.2.24-1
- Upgrade to version 3.2.24
* Tue Mar 19 2024 Shop You <shopyou@tencent.com> - 3.2-2
- Add patches to fix CVE-2021-45115,CVE-2022-34265
* Sat Oct 07 2023 Miaojun Dong <zoedong@tencent.com> - 3.2-1
- Downgrade version to 3.2 to meet openstack-dashboard-23.0.0 Requirement
* Thu Sep 28 2023 cunshunxia <cunshunxia@tencent.com> - 4.2.5-1
- Upgrade to version 4.2.5
* Tue Sep 19 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.2.28-6
- Rebuilt for python 3.11
* Thu Sep 14 2023 Shuo Wang <abushwang@tencent.com> - 2.2.28-5
- use %setup for bootstrap
* Thu Sep 14 2023 Shuo Wang <abushwang@tencent.com> - 2.2.28-4
- bypass many test for python 3.11
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.2.28-3
- Rebuilt for OpenCloudOS Stream 23.09
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.2.28-2
- Rebuilt for OpenCloudOS Stream 23.05
* Sun Apr 23 2023 Miaojun Dong <zoedong@tencent.com> - 2.2.28-1
- initial build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。