File python-djangorestframework.spec of Package python-djangorestframework
#
# spec file for package python-djangorestframework
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-djangorestframework
Version: 3.7.7
Release: 0
Summary: A Lightweight REST Framework for Django
License: BSD-2-Clause
Group: Development/Languages/Python
Url: http://django-rest-framework.org/
Source: http://pypi.python.org/packages/source/d/djangorestframework/djangorestframework-%{version}.tar.gz
BuildRequires: %{python_module Django >= 1.10}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Django >= 1.10
%ifpython2
Provides: %{oldpython}-django-rest-framework = %{version}
Obsoletes: %{oldpython}-django-rest-framework < %{version}
%endif
%ifpython3
Provides: python3-django-rest-framework = %{version}
Obsoletes: python3-django-rest-framework < %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Django REST framework is a lightweight library that makes it easy to build Web
APIs. It is designed as a modular and easy to customize architecture, based on
Django's class based views.
Web APIs built using REST framework are fully self-describing and web
browseable - a huge useability win for your developers. It also supports a wide
range of media types, authentication and permission policies out of the box.
%prep
%setup -q -n djangorestframework-%{version}
%build
%python_build
%install
%python_install
%fdupes %{buildroot}/%{_prefix}
%files %python_files
%defattr(-,root,root,-)
%{python_sitelib}/*
%changelog