/[packages]/updates/8/python-django/current/SPECS/python-django.spec
ViewVC logotype

Diff of /updates/8/python-django/current/SPECS/python-django.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1419833 by kekepower, Wed Jul 10 07:02:10 2019 UTC revision 1430721 by wally, Wed Aug 21 06:34:42 2019 UTC
# Line 3  Line 3 
3    
4  Summary:        A high-level Python Web framework  Summary:        A high-level Python Web framework
5  Name:           python-%{module}  Name:           python-%{module}
6  Version:        1.11.22  Version:        2.2.4
7  Release:        %mkrel 1  Release:        %mkrel 1
 Source0:        https://files.pythonhosted.org/packages/source/D/%{tarname}/%{tarname}-%{version}.tar.gz  
8  License:        BSD  License:        BSD
9  Group:          Development/Python  Group:          Development/Python
10  Url:            http://www.djangoproject.com  Url:            http://www.djangoproject.com
11    Source0:        https://files.pythonhosted.org/packages/source/D/%{tarname}/%{tarname}-%{version}.tar.gz
12  BuildArch:      noarch  BuildArch:      noarch
 BuildRequires:  python2dist(setuptools)  
 BuildRequires:  python2dist(sphinx)  
 BuildRequires:  python-sphinx_rtd_theme  
 BuildRequires:  pkgconfig(python2)  
13  BuildRequires:  pkgconfig(python3)  BuildRequires:  pkgconfig(python3)
14  BuildRequires:  python3dist(setuptools)  BuildRequires:  python3dist(setuptools)
 BuildRequires:  python3-sphinx_rtd_theme  
 Requires:       %{name}-bash-completion = %{version}-%{release}  
   
 %description  
 Django is a high-level Python Web framework that encourages rapid development  
 and clean, pragmatic design.  
   
 Developed and used over the past two years by a fast-moving online-news  
 operation, Django was designed from scratch to handle two challenges: the  
 intensive deadlines of a newsroom and the stringent requirements of experienced  
 Web developers. It has convenient niceties for developing content-management  
 systems, but it's an excellent tool for building any Web site.  
   
 Django focuses on automating as much as possible and adhering to the  
 DRY principle.  
15    
16  %package -n python2-%{module}  # for docs
17  Summary:        A high-level Python 2 Web framework  BuildRequires:  python3dist(sphinx)
18  Group:          Development/Python  BuildRequires:  python3dist(sphinx-rtd-theme)
 Requires:       %{name}-bash-completion = %{version}-%{release}  
 %{?python_provide:%python_provide python2-%{module}}  
 Obsoletes:      python-django < 1.11.11-1  
 Obsoletes:      python-django16  
 Obsoletes:      python2-django16  
 Obsoletes:      python-django16-multiselectfield  
 Obsoletes:      python-django16-pipeline  
 Obsoletes:      python2-djblets  
 Provides:       python-django = %{version}-%{release}  
   
 %description -n python2-%{module}  
19    
20    %description
21  Django is a high-level Python Web framework that encourages rapid development  Django is a high-level Python Web framework that encourages rapid development
22  and clean, pragmatic design.  and clean, pragmatic design.
23    
# Line 59  systems, but it's an excellent tool for Line 30  systems, but it's an excellent tool for
30  Django focuses on automating as much as possible and adhering to the  Django focuses on automating as much as possible and adhering to the
31  DRY principle.  DRY principle.
32    
 %package bash-completion  
 Group:      Development/Python  
 Summary:    bash completion files for Django  
   
   
 %description bash-completion  
 This package contains the bash completion files form Django high-level  
 Python Web framework.  
   
33  %package -n python3-%{module}  %package -n python3-%{module}
34  Summary:        A high-level Python 3 Web framework  Summary:        A high-level Python 3 Web framework
35  Group:          Development/Python  Group:          Development/Python
36  %{?python_provide:%python_provide python3-%{module}}  %{?python_provide:%python_provide python3-%{module}}
37  Requires:       %{name}-bash-completion = %{version}-%{release}  Obsoletes:      %{name}-bash-completion < 2.2.4
38    Obsoletes:      python2-django < 2.2.4
39    
40  %description -n python3-%{module}  %description -n python3-%{module}
   
41  Django is a high-level Python Web framework that encourages rapid development  Django is a high-level Python Web framework that encourages rapid development
42  and clean, pragmatic design.  and clean, pragmatic design.
43    
# Line 88  systems, but it's an excellent tool for Line 50  systems, but it's an excellent tool for
50  Django focuses on automating as much as possible and adhering to the  Django focuses on automating as much as possible and adhering to the
51  DRY principle.  DRY principle.
52    
 %package doc  
 Summary:        Documentation for django  
 Group:          Development/Python  
 Provides:       python3-%{module}-doc = %{version}-%{release}  
   
 %description doc  
 This package contains documentation for Django,  
 a high-level Python Web framework.  
   
53  %prep  %prep
54  %setup -q -n %{tarname}-%{version}  %setup -q -n %{tarname}-%{version}
55    
56    # drop bundled egg-info
57    rm -rf Django.egg-info/
58    
59    # fix shebangs
60    find . -name "*.py" -o -name "*.py-tpl" -exec sed -i -e '1s|#!.*python[2,3]\?|#!%{__python3}|' {} \;
61    
62  # empty files  # empty files
63  for f in \  for f in \
64      django/contrib/staticfiles/models.py \      django/contrib/staticfiles/models.py \
# Line 107  for f in \ Line 66  for f in \
66  ; do  ; do
67    echo "# just a comment" > $f    echo "# just a comment" > $f
68  done  done
 cp -a . %{py3dir}  
69    
70  %build  %build
 %py2_build  
   
 pushd %{py3dir}  
71  %py3_build  %py3_build
 popd  
72    
73  %install  %install
 # must do install of python 3 subpackage first, so that we don't  
 # overwrite django-admin script with the python 3 version  
 pushd %{py3dir}  
74  %py3_install  %py3_install
 mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/python3-django-admin  
 popd  
   
 %py2_install  
75    
76  # build documentation  # build documentation
77  (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html)  rm -rf docs/{html,man}/*
78    make -C docs man
79    make -C docs html
80    rm -rf docs/_build/html/.{buildinfo,doctrees}
81    
82  # install man pages  # install man pages
83  mkdir -p %{buildroot}%{_mandir}/man1/  mkdir -p %{buildroot}%{_mandir}/man1/
84  cp -p docs/man/* %{buildroot}%{_mandir}/man1/  cp -a docs/_build/man/* %{buildroot}%{_mandir}/man1/
 cp -a %{buildroot}%{_mandir}/man1/django-admin.1 %{buildroot}%{_mandir}/man1/python3-django-admin.1  
85    
86  # install bash completion script  # install bash completion script
87  mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/  mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
# Line 141  install -m 0644 -p extras/django_bash_co Line 89  install -m 0644 -p extras/django_bash_co
89     %{buildroot}%{_sysconfdir}/bash_completion.d/     %{buildroot}%{_sysconfdir}/bash_completion.d/
90    
91  # Fix items in %%{_bindir}  # Fix items in %%{_bindir}
92  mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/django-admin  mv %{buildroot}%{_bindir}/django-admin{.py,}
93    
94    %files -n python3-%{module}
 %files -n python2-%{module}  
95  %doc AUTHORS LICENSE README.rst  %doc AUTHORS LICENSE README.rst
96    %doc docs/_build/html
97  %{_mandir}/man1/*  %{_mandir}/man1/*
 # except the python3 prefix  
 %exclude %{_mandir}/man1/python3-*  
98  %{_bindir}/django-admin  %{_bindir}/django-admin
99  %{python2_sitelib}/%{module}  %{_sysconfdir}/bash_completion.d/django_bash_completion
100  %{python2_sitelib}/%{tarname}-*.egg-info  %{python3_sitelib}/%{module}/
   
 %files -n python3-%{module}  
 %doc AUTHORS LICENSE README.rst  
 %{_mandir}/man1/python3-*  
 %{_bindir}/python3-django-admin  
 %{python3_sitelib}/%{module}  
101  %{python3_sitelib}/%{tarname}-*.egg-info  %{python3_sitelib}/%{tarname}-*.egg-info
   
 %files doc  
 %doc docs/_build/html  
   
 %files bash-completion  
 %dir %{_sysconfdir}/bash_completion.d/  
 %config(noreplace) %{_sysconfdir}/bash_completion.d/django_bash_completion  
   

Legend:
Removed from v.1419833  
changed lines
  Added in v.1430721

  ViewVC Help
Powered by ViewVC 1.1.30