mrunge pushed to python-django-rest-framework (master). "initial import (rhbz#1197605)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon May 11 07:28:05 UTC 2015


From a8d99a8bdb4983abbc776a6f4b987216c08f29a0 Mon Sep 17 00:00:00 2001
From: Matthias Runge <mrunge at redhat.com>
Date: Mon, 11 May 2015 09:27:45 +0200
Subject: initial import (rhbz#1197605)


diff --git a/.gitignore b/.gitignore
index e69de29..37cad33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/djangorestframework-3.1.1.tar.gz
diff --git a/python-django-rest-framework.spec b/python-django-rest-framework.spec
new file mode 100644
index 0000000..b073c7a
--- /dev/null
+++ b/python-django-rest-framework.spec
@@ -0,0 +1,169 @@
+%global pypi_name djangorestframework
+
+%{!?__python2:%global __python2 %{__python}}
+%{!?python2_sitelib:   %global python2_sitelib  %{python_sitelib}}
+%{!?python2_sitearch:  %global python2_sitearch %{python_sitearch}}
+%{!?python2_version:   %global python2_version  %{python_version}}
+
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
+Name:           python-django-rest-framework
+Version:        3.1.1
+Release:        3%{?dist}
+Summary:        Web APIs for Django, made easy
+
+License:        BSD
+URL:            http://www.django-rest-framework.org
+Source0:        https://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+BuildArch:      noarch
+
+Requires:       python-django
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+
+%description
+Django REST framework is a powerful and flexible toolkit that makes it easy
+to build Web APIs.
+
+Some reasons you might want to use REST framework:
+
+* The Web browsable API is a huge usability win for your developers.
+* Authentication policies including OAuth1a and OAuth2 out of the box.
+* Serialization that supports both ORM and non-ORM data sources.
+* Customizable all the way down - just use regular function-based views if
+  you don't need the more powerful features.
+* Extensive documentation, and great community support.
+
+
+%if 0%{?with_python3}
+%package -n python3-django-rest-framework
+Summary:        Web APIs for Django, made easy
+
+Requires:       python3-django
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+
+%description -n python3-django-rest-framework
+Django REST framework is a powerful and flexible toolkit that makes it easy
+to build Web APIs.
+
+Some reasons you might want to use REST framework:
+
+* The Web browsable API is a huge usability win for your developers.
+* Authentication policies including OAuth1a and OAuth2 out of the box.
+* Serialization that supports both ORM and non-ORM data sources.
+* Customizable all the way down - just use regular function-based views if
+  you don't need the more powerful features.
+* Extensive documentation, and great community support.
+
+%endif
+
+%prep
+%setup -qc
+mv %{pypi_name}-%{version} python2
+pushd python2
+
+# copy PKG-INFO to top level dir
+cp -a PKG-INFO ..
+
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+
+# remove a left-over .DS_Store
+rm rest_framework/locale/en_US/.DS_Store
+
+# remove .po files
+find . -name *.po -exec rm -f '{}' \;
+popd
+
+%if 0%{?with_python3}
+cp -a python2 python3
+%endif
+
+%build
+pushd python2
+%{__python2} setup.py build
+popd
+
+
+%if 0%{?with_python3}
+pushd python3
+%{__python3} setup.py build
+popd
+%endif
+
+%install
+pushd python2
+%{__python2} setup.py install --skip-build --root %{buildroot}
+popd
+
+%if 0%{?with_python3}
+pushd python3
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
+%find_lang django
+
+# separate into files for python2.7 and 3.x
+grep "python%{python2_version}" django.lang > django_27.lang
+grep "python%{python3_version}" django.lang > django_34.lang
+
+%files -f django_27.lang
+%doc PKG-INFO
+
+# license file is not distributed in source distribution
+# https://github.com/tomchristie/django-rest-framework/issues/2906
+# once it's released, license will be named LICENSE.md
+#%%license LICENSE.md
+%dir %{python2_sitelib}/rest_framework/
+%{python2_sitelib}/rest_framework/authtoken
+%dir %{python2_sitelib}/rest_framework/locale
+%dir %{python2_sitelib}/rest_framework/locale/??/
+%dir %{python2_sitelib}/rest_framework/locale/??/LC_MESSAGES
+%dir %{python2_sitelib}/rest_framework/locale/??_??/
+%dir %{python2_sitelib}/rest_framework/locale/??_??/LC_MESSAGES
+%{python2_sitelib}/rest_framework/static
+%{python2_sitelib}/rest_framework/templates
+%{python2_sitelib}/rest_framework/templatetags
+%{python2_sitelib}/rest_framework/utils
+%{python2_sitelib}/rest_framework/*.py*
+%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info
+
+%files -n python3-django-rest-framework -f django_34.lang
+%doc PKG-INFO
+
+# license file is not distributed in source distribution
+# https://github.com/tomchristie/django-rest-framework/issues/2906
+#%%license
+%{python3_sitelib}/rest_framework/__pycache__
+%dir %{python3_sitelib}/rest_framework/
+%{python3_sitelib}/rest_framework/authtoken
+%dir %{python3_sitelib}/rest_framework/locale
+%dir %{python3_sitelib}/rest_framework/locale/??/
+%dir %{python3_sitelib}/rest_framework/locale/??/LC_MESSAGES
+%dir %{python3_sitelib}/rest_framework/locale/??_??/
+%dir %{python3_sitelib}/rest_framework/locale/??_??/LC_MESSAGES
+%{python3_sitelib}/rest_framework/static
+%{python3_sitelib}/rest_framework/templates
+%{python3_sitelib}/rest_framework/templatetags
+%{python3_sitelib}/rest_framework/utils
+%{python3_sitelib}/rest_framework/*.py*
+%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
+
+%changelog
+* Tue May 05 2015 Matthias Runge <mrunge at redhat.com> - 3.1.1-3
+- handle locales better (rhbz#1197605)
+
+* Tue May 05 2015 Matthias Runge <mrunge at redhat.com> - 3.1.1-2
+- add python-setuptools to BR
+
+* Tue May 05 2015 Matthias Runge <mrunge at redhat.com> - 3.1.1-1
+- update to 3.1.1
+- add python3 subpackage
+
+* Fri Feb 27 2015 Matthias Runge <mrunge at redhat.com> - 3.0.5-1
+- Initial package. (rhbz#1197605)
diff --git a/sources b/sources
index e69de29..f3e7193 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d0f6aa82d49e63faebaadfc089e5e80b  djangorestframework-3.1.1.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-django-rest-framework.git/commit/?h=master&id=a8d99a8bdb4983abbc776a6f4b987216c08f29a0


More information about the scm-commits mailing list