Группа :: Development/Python3
Пакет: python3-module-django
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define branch 4.2
%define origname Django
%define oname django
%def_enable check
%add_python3_req_skip hotshot StringIO
%add_findreq_skiplist %python3_sitelibdir/%oname/contrib/gis/db/backends/*/*
Summary: A high-level Python 3 Web framework that encourages rapid development and clean, pragmatic design.
Name: python3-module-%oname
Version: %branch.4
Release: alt2
Source0: %origname-%version.tar
License: BSD-3-Clause
Group: Development/Python3
BuildArch: noarch
VCS: https://github.com/django/django
URL: http://www.djangoproject.com/
Provides: %name%branch = %EVR
Provides: %name%branch-tests = %EVR
Obsoletes: %name%branch < %EVR
Obsoletes: %name%branch-tests < %EVR
Provides: %name-tests = %EVR
Obsoletes: %name-tests < %EVR
%py3_provides django.core.management.commands.loaddata
%py3_provides django.core.management.commands.test
%py3_provides django.core.management.commands.runserver
Conflicts: python3-module-django1.11
Conflicts: python3-module-django1.11-tests
%add_python3_req_skip django.test.signals
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-module-setuptools python3-module-setuptools-wheel
BuildRequires: python3-module-asgiref >= 3.6.0
BuildRequires: python3-module-sqlparse >= 0.3.1
BuildRequires: bash-completion
%if_enabled check
BuildRequires: python3(sqlparse)
BuildRequires: python3(pytz)
BuildRequires: python3(sqlite3)
BuildRequires: python3(jinja2)
BuildRequires: python3(numpy)
BuildRequires: python3(pylibmc)
BuildRequires: python3(memcache)
BuildRequires: python3(yaml)
BuildRequires: python3(selenium)
%endif
%description
%summary
%package dbbackend-mysql
Summary: MySQLSQL support for Django
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-mysql = %EVR
Obsoletes: %name%branch-dbbackend-mysql < %EVR
Conflicts: python3-module-django1.11-dbbackend-mysql
%py3_requires MySQLdb
%description dbbackend-mysql
%summary
%package dbbackend-postgresql
Summary: PostgreSQL support for Django.
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-psycopg = %EVR
Obsoletes: %name%branch-dbbackend-psycopg < %EVR
Provides: %name%branch-dbbackend-psycopg2 = %EVR
Obsoletes: %name%branch-dbbackend-psycopg2 < %EVR
Conflicts: python3-module-django1.11-dbbackend-psycopg
Conflicts: python3-module-django1.11-dbbackend-psycopg2
%py3_requires psycopg2
%description dbbackend-postgresql
%summary
%package dbbackend-sqlite3
Summary: SQLite3 support for Django (Python 3)
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-sqlite3 = %EVR
Obsoletes: %name%branch-dbbackend-sqlite3 < %EVR
Conflicts: python3-module-django1.11-dbbackend-sqlite3
%py3_requires sqlite3
%description dbbackend-sqlite3
%summary
%package dbbackend-oracle
Summary: Oracle support for Django (Python 3)
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-oracle = %EVR
Obsoletes: %name%branch-dbbackend-oracle < %EVR
%add_python3_req_skip cx_Oracle
%description dbbackend-oracle
%summary
%package doc
Summary: Django documentation
Group: Development/Python3
Provides: %name%branch-doc = %EVR
Obsoletes: %name%branch-doc < %EVR
Conflicts: python3-module-django1.11-doc
%description doc
%summary
%prep
%setup -n %origname-%version
# Use system six instead of bundled
find -type f -name '*.py*' -exec sed -i 's|django.utils.six|six|' -- '{}' +
find -type f -name '*.py*' -exec sed -i 's|%_bindir/env python|%_bindir/python3|' -- '{}' +
find -type f -name '*.py' -exec sed -i 's|.*from future_builtins import zip.*||' -- '{}' +
%build
%python3_build
%install
export LC_ALL=en_US.UTF-8
%python3_install
# install man pages (for the main executable only)
mkdir -p %buildroot%_man1dir
cp -p docs/man/* %buildroot%_man1dir
# install bash completion script
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
mkdir -p %{buildroot}$bashcompdir
install -m 0644 -p extras/django_bash_completion \
%{buildroot}$bashcompdir/django-admin
ln -s django-admin %{buildroot}$bashcompdir/django-admin-3
ln -s django-admin %{buildroot}$bashcompdir/python3-django-admin
# Add backward compatible links to %%{_bindir}
ln -s ./django-admin %buildroot%_bindir/django-admin-3
ln -s ./django-admin %buildroot%_bindir/python3-django-admin
# remove .po files
find %buildroot -name "*.po" | xargs rm -f
%check
export PYTHONPATH=$(pwd)
cd tests
LANG="en_US.UTF-8" python3 runtests.py --settings=test_sqlite --verbosity=2 --parallel 1
%files
%_bindir/*
%_man1dir/*
%_datadir/bash-completion/completions/*
%python3_sitelibdir/*
#exclude %%python3_sitelibdir/%%oname/core/handlers/modpython.py*
#exclude %%python3_sitelibdir/%%oname/contrib/auth/handlers/modpython.py*
%exclude %python3_sitelibdir/%oname/db/backends/mysql
%exclude %python3_sitelibdir/%oname/db/backends/postgresql
%exclude %python3_sitelibdir/%oname/db/backends/sqlite3
%exclude %python3_sitelibdir/%oname/db/backends/oracle
%files doc
%doc docs
%files dbbackend-mysql
%python3_sitelibdir/%oname/db/backends/mysql
%files dbbackend-postgresql
%python3_sitelibdir/%oname/db/backends/postgresql
%files dbbackend-oracle
%python3_sitelibdir/%oname/db/backends/oracle
%files dbbackend-sqlite3
%python3_sitelibdir/%oname/db/backends/sqlite3
%changelog
…
Полный changelog можно просмотреть здесь
%define origname Django
%define oname django
%def_enable check
%add_python3_req_skip hotshot StringIO
%add_findreq_skiplist %python3_sitelibdir/%oname/contrib/gis/db/backends/*/*
Summary: A high-level Python 3 Web framework that encourages rapid development and clean, pragmatic design.
Name: python3-module-%oname
Version: %branch.4
Release: alt2
Source0: %origname-%version.tar
License: BSD-3-Clause
Group: Development/Python3
BuildArch: noarch
VCS: https://github.com/django/django
URL: http://www.djangoproject.com/
Provides: %name%branch = %EVR
Provides: %name%branch-tests = %EVR
Obsoletes: %name%branch < %EVR
Obsoletes: %name%branch-tests < %EVR
Provides: %name-tests = %EVR
Obsoletes: %name-tests < %EVR
%py3_provides django.core.management.commands.loaddata
%py3_provides django.core.management.commands.test
%py3_provides django.core.management.commands.runserver
Conflicts: python3-module-django1.11
Conflicts: python3-module-django1.11-tests
%add_python3_req_skip django.test.signals
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-module-setuptools python3-module-setuptools-wheel
BuildRequires: python3-module-asgiref >= 3.6.0
BuildRequires: python3-module-sqlparse >= 0.3.1
BuildRequires: bash-completion
%if_enabled check
BuildRequires: python3(sqlparse)
BuildRequires: python3(pytz)
BuildRequires: python3(sqlite3)
BuildRequires: python3(jinja2)
BuildRequires: python3(numpy)
BuildRequires: python3(pylibmc)
BuildRequires: python3(memcache)
BuildRequires: python3(yaml)
BuildRequires: python3(selenium)
%endif
%description
%summary
%package dbbackend-mysql
Summary: MySQLSQL support for Django
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-mysql = %EVR
Obsoletes: %name%branch-dbbackend-mysql < %EVR
Conflicts: python3-module-django1.11-dbbackend-mysql
%py3_requires MySQLdb
%description dbbackend-mysql
%summary
%package dbbackend-postgresql
Summary: PostgreSQL support for Django.
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-psycopg = %EVR
Obsoletes: %name%branch-dbbackend-psycopg < %EVR
Provides: %name%branch-dbbackend-psycopg2 = %EVR
Obsoletes: %name%branch-dbbackend-psycopg2 < %EVR
Conflicts: python3-module-django1.11-dbbackend-psycopg
Conflicts: python3-module-django1.11-dbbackend-psycopg2
%py3_requires psycopg2
%description dbbackend-postgresql
%summary
%package dbbackend-sqlite3
Summary: SQLite3 support for Django (Python 3)
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-sqlite3 = %EVR
Obsoletes: %name%branch-dbbackend-sqlite3 < %EVR
Conflicts: python3-module-django1.11-dbbackend-sqlite3
%py3_requires sqlite3
%description dbbackend-sqlite3
%summary
%package dbbackend-oracle
Summary: Oracle support for Django (Python 3)
Group: Development/Python3
Requires: %name = %EVR
Provides: %name%branch-dbbackend-oracle = %EVR
Obsoletes: %name%branch-dbbackend-oracle < %EVR
%add_python3_req_skip cx_Oracle
%description dbbackend-oracle
%summary
%package doc
Summary: Django documentation
Group: Development/Python3
Provides: %name%branch-doc = %EVR
Obsoletes: %name%branch-doc < %EVR
Conflicts: python3-module-django1.11-doc
%description doc
%summary
%prep
%setup -n %origname-%version
# Use system six instead of bundled
find -type f -name '*.py*' -exec sed -i 's|django.utils.six|six|' -- '{}' +
find -type f -name '*.py*' -exec sed -i 's|%_bindir/env python|%_bindir/python3|' -- '{}' +
find -type f -name '*.py' -exec sed -i 's|.*from future_builtins import zip.*||' -- '{}' +
%build
%python3_build
%install
export LC_ALL=en_US.UTF-8
%python3_install
# install man pages (for the main executable only)
mkdir -p %buildroot%_man1dir
cp -p docs/man/* %buildroot%_man1dir
# install bash completion script
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
mkdir -p %{buildroot}$bashcompdir
install -m 0644 -p extras/django_bash_completion \
%{buildroot}$bashcompdir/django-admin
ln -s django-admin %{buildroot}$bashcompdir/django-admin-3
ln -s django-admin %{buildroot}$bashcompdir/python3-django-admin
# Add backward compatible links to %%{_bindir}
ln -s ./django-admin %buildroot%_bindir/django-admin-3
ln -s ./django-admin %buildroot%_bindir/python3-django-admin
# remove .po files
find %buildroot -name "*.po" | xargs rm -f
%check
export PYTHONPATH=$(pwd)
cd tests
LANG="en_US.UTF-8" python3 runtests.py --settings=test_sqlite --verbosity=2 --parallel 1
%files
%_bindir/*
%_man1dir/*
%_datadir/bash-completion/completions/*
%python3_sitelibdir/*
#exclude %%python3_sitelibdir/%%oname/core/handlers/modpython.py*
#exclude %%python3_sitelibdir/%%oname/contrib/auth/handlers/modpython.py*
%exclude %python3_sitelibdir/%oname/db/backends/mysql
%exclude %python3_sitelibdir/%oname/db/backends/postgresql
%exclude %python3_sitelibdir/%oname/db/backends/sqlite3
%exclude %python3_sitelibdir/%oname/db/backends/oracle
%files doc
%doc docs
%files dbbackend-mysql
%python3_sitelibdir/%oname/db/backends/mysql
%files dbbackend-postgresql
%python3_sitelibdir/%oname/db/backends/postgresql
%files dbbackend-oracle
%python3_sitelibdir/%oname/db/backends/oracle
%files dbbackend-sqlite3
%python3_sitelibdir/%oname/db/backends/sqlite3
%changelog
…
Полный changelog можно просмотреть здесь