[python-django-tastypie: 1/3] Update to 0.9.14

Miro Hrončok churchyard at fedoraproject.org
Tue Mar 26 18:07:10 UTC 2013


commit c31293e89d46738ba4cc65bfa4b4bef882c1a05d
Author: Miro Hrončok <miro at hroncok.cz>
Date:   Tue Mar 26 19:01:28 2013 +0100

    Update to 0.9.14

 python-django-tastypie.spec |   63 +++++++++++++++++++++++-------------------
 1 files changed, 34 insertions(+), 29 deletions(-)
---
diff --git a/python-django-tastypie.spec b/python-django-tastypie.spec
index f8977a3..19a1440 100644
--- a/python-django-tastypie.spec
+++ b/python-django-tastypie.spec
@@ -1,33 +1,20 @@
 %global pypi_name django-tastypie
-%global docdir %{_docdir}/%{name}-%{fullver}
-
-%global majorver 0.9.12
-%global release 2
-# comment this out to get back to normal versioning
-%global preminorver alpha
-%global fullver %{majorver}%{?preminorver:-%{preminorver}}
-
 Name:           python-%{pypi_name}
-Version:        %{majorver}
-Release:        %{?preminorver:0.}%{release}%{?preminorver:.%{preminorver}}%{?dist}
+Version:        0.9.14
+Release:        1%{?dist}
 Summary:        A flexible and capable API layer for Django
 
 Group:          Development/Languages
 License:        BSD
 URL:            https://github.com/toastdriven/django-tastypie/
-# Only for snapshots:
-# git clone https://github.com/toastdriven/django-tastypie.git
-# mv django-tastypie django-tastypie-0.9.12-alpha
-# tar czf django-tastypie-0.9.12-alpha.tar.gz django-tastypie-0.9.12-alpha
-Source0:        %{pypi_name}-%{fullver}.tar.gz
-
-# Only for non-snapshot versions:
-#Source0:        http://pypi.python.org/packages/source/d/%%{pypi_name}/%%{pypi_name}-%%{version}.tar.gz
-# to get tests:
-# git clone https://github.com/toastdriven/django-tastypie.git && cd django-tastypie
-# git checkout v0.9.12
-# tar -czf django-tastypie-0.9.12-tests.tgz tests/
-#Source1:        %%{pypi_name}-tests.tgz
+# Release version doesn't include tests
+Source0:        http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# To get version with tests (last commit in tag v0.9.14):
+%global commit 19218ef73dee4d85b6ec87bf0d2b6293da79758e
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+Source1:        https://github.com/toastdriven/%{pypi_name}/archive/%{commit}/%{pypi_name}-%{version}-github.tar.gz
+
+%global docdir %{_docdir}/%{name}-%{version}
 
 BuildArch:      noarch
 # Let's keep Requires and BuildRequires sorted alphabetically
@@ -43,8 +30,10 @@ BuildRequires:  python-django >= 1.2.0
 %else
 BuildRequires:  Django >= 1.2.0
 %endif
+BuildRequires:  python-defusedxml
 BuildRequires:  python-lxml
 BuildRequires:  python-mimeparse >= 0.1.3
+BuildRequires:  python-mock
 BuildRequires:  python-setuptools
 BuildRequires:  python-sphinx
 BuildRequires:  PyYAML
@@ -83,10 +72,9 @@ This package contains documentation for %{name}.
 
 
 %prep 
-%setup -q -n django-tastypie-%{fullver}
-rm -rf *egg-info
-%{!?preminorver:tar xzf %{SOURCE1}}
-sed -i 's|django-admin.py|django-admin|' tests/run_all_tests.sh
+%setup -qb1 -n %{pypi_name}-%{commit}
+%setup -q -n %{pypi_name}-%{version}
+cp -r ../%{pypi_name}-%{commit}/tests .
 # (re)generate the documentation
 sphinx-build docs docs/_build/html
 
@@ -112,11 +100,21 @@ cp -pr docs/_build/html -t $RPM_BUILD_ROOT%{docdir}
 # from the authors documentation it is now not very clear if it is
 # django-oauth or django-oauth-provider or django-oauth-plus
 # anyway, it is not a hard requirement
-# also, the gis tests need a running postresql server, so they are skipped
+# also, the gis tests need a running postgresql server, so they are skipped
+# run_all_tests.sh is no longer used, following commands are copied from tox.ini
 pushd tests
 # handle building on hosts with bad DNS
 find -type f -name '*.py' -print | xargs sed -i 's|localhost|127.0.0.1|'
-./run_all_tests.sh
+export PYTHONPATH=$PWD:$PWD/..${PYTHONPATH:+:$PYTHONPATH}
+#django-admin test core --settings=settings_core
+django-admin test basic --settings=settings_basic
+django-admin test complex --settings=settings_complex
+django-admin test alphanumeric --settings=settings_alphanumeric
+django-admin test slashless --settings=settings_slashless
+django-admin test namespaced --settings=settings_namespaced
+django-admin test related_resource --settings=settings_related
+django-admin test validation --settings=settings_validation
+django-admin test content_gfk --settings=settings_content_gfk
 popd
  
 %files
@@ -130,6 +128,13 @@ popd
 %exclude %{docdir}/html/.*
 
 %changelog
+* Thu Mar 21 2013 Miro Hrončok <mhroncok at redhat.com> - 0.9.14-1
+- New version
+- Using new GitHub rule to get archive with tests
+- Run tests manually
+- Added BR python-defusedxml
+- Dropped dance around release and development versioning
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.12-0.2.alpha
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list