[packages/python-django] - move django-admin alias to python3
qboosh
qboosh at pld-linux.org
Sat Jan 30 09:53:28 CET 2021
commit 72080aff101045d4a6e8dbbd645cc993347b7c33
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 30 09:53:41 2021 +0100
- move django-admin alias to python3
python-django.spec | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/python-django.spec b/python-django.spec
index ba8b5ec..b8d79fe 100644
--- a/python-django.spec
+++ b/python-django.spec
@@ -66,6 +66,7 @@ Group: Libraries/Python
Suggests: python3-MySQLdb
Suggests: python3-devel-tools
Suggests: python3-psycopg2
+Conflicts: python-django < 1.11.29
%description -n python3-%{module}
Django is a high-level Python Web framework that encourages rapid
@@ -142,16 +143,9 @@ ln -s django-admin-3 $RPM_BUILD_ROOT%{_bindir}/py3-django-admin
%endif
# setup "django-admin" global alias
-# this needs to be done after both Python versions are installed
-# otherwise file contents would be overwritten via symlink
-%if %{with python2}
-# default to python2 if built
-ln -sf py2-django-admin $RPM_BUILD_ROOT%{_bindir}/django-admin
-%else
%if %{with python3}
ln -sf py3-django-admin $RPM_BUILD_ROOT%{_bindir}/django-admin
%endif
-%endif
%if %{with doc}
install -d $RPM_BUILD_ROOT%{_docdir}
@@ -188,9 +182,8 @@ rm -rf $RPM_BUILD_ROOT
%files -f python2-django.lang
%defattr(644,root,root,755)
%doc AUTHORS LICENSE README.rst
-%attr(755,root,root) %{_bindir}/django-admin
-%attr(755,root,root) %{_bindir}/py2-django-admin
%attr(755,root,root) %{_bindir}/django-admin-2
+%attr(755,root,root) %{_bindir}/py2-django-admin
%dir %{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}/*.py[co]
%{py_sitescriptdir}/%{module}/apps
@@ -305,11 +298,9 @@ rm -rf $RPM_BUILD_ROOT
%files -n python3-%{module} -f python3-django.lang
%defattr(644,root,root,755)
%doc AUTHORS LICENSE README.rst
-%if %{without python2}
%attr(755,root,root) %{_bindir}/django-admin
-%endif
-%attr(755,root,root) %{_bindir}/py3-django-admin
%attr(755,root,root) %{_bindir}/django-admin-3
+%attr(755,root,root) %{_bindir}/py3-django-admin
%dir %{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}/*.py
%{py3_sitescriptdir}/%{module}/__pycache__
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-django.git/commitdiff/72080aff101045d4a6e8dbbd645cc993347b7c33
More information about the pld-cvs-commit
mailing list