[python-tgfastdata] "New" upstream.release Many patches to fix bugs
Toshio くらとみ
toshio at fedoraproject.org
Fri Jul 15 18:58:18 UTC 2011
commit 87b5527cf511a5319bfc9ae8fd637718754bf59f
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Fri Jul 15 11:58:00 2011 -0700
"New" upstream.release
Many patches to fix bugs
.gitignore | 1 +
python-tgfastdata.spec | 52 +++++++++++++++++++-------------
sources | 2 +-
tgfastdata-date-widget-fix.patch | 13 ++++++++
tgfastdata-foreign-key-unittest.patch | 14 +++++++++
tgfastdata-requires.patch | 8 +++++
6 files changed, 68 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0930b20..30441dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
TGFastData-0.9a6-py2.4.egg
+/TGFastData-0.9a7.zip
diff --git a/python-tgfastdata.spec b/python-tgfastdata.spec
index 372862e..4def129 100644
--- a/python-tgfastdata.spec
+++ b/python-tgfastdata.spec
@@ -1,22 +1,29 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%define module tgfastdata
+%global module tgfastdata
+%global srcname TGFastData
Name: python-tgfastdata
-Version: 0.9a6
-Release: 12%{?dist}
+# Be very careful here. This Version is wrong and may not upgrade correctly if we're not careful
+# If version switches to 0.10XXXX, remove the alpha portion from the Version:
+Version: 0.9a7
+Release: 0.1.a7%{?dist}
Summary: Automatic user interface generation for TurboGears
Group: Development/Languages
License: MIT
-URL: http://www.turbogears.org/docs/plugins/template.html
-Source0: http://files.turbogears.org/eggs/TGFastData-%{version}-py2.4.egg
+URL: http://pypi.python.org/pypi/TGFastData/
+Source0: http://pypi.python.org/packages/source/T/%{srcname}/%{srcname}-0.9a7.zip
+Patch0: tgfastdata-requires.patch
+Patch1: tgfastdata-date-widget-fix.patch
+Patch2: tgfastdata-foreign-key-unittest.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: python-devel
-
+BuildRequires: python2-devel
+# For tests
+BuildRequires: TurboGears
+Requires: TurboGears
%description
FastData is an extension to TurboGears which can provide automatic user
@@ -24,22 +31,20 @@ interface generation based upon an application's model objects.
%prep
-%setup -q -c
-
+%setup -q -n %{srcname}-%{version}
+%patch0 -p1 -b .deps
+%patch1 -p1 -b .dw
+%patch2 -p1 -b .fk
%build
-
+%{__python} setup.py build
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}%{python_sitelib}/%{module}{,/templates}
-install -p -m 0644 %{module}/*.py %{buildroot}%{python_sitelib}/%{module}
-install -p -m 0644 %{module}/templates/* %{buildroot}%{python_sitelib}/%{module}/templates
-
-# Install the egg-info directory
-mkdir -p %{buildroot}%{python_sitelib}/TGFastData-%{version}-py%{pyver}.egg-info
-install -p -m 0644 EGG-INFO/* %{buildroot}%{python_sitelib}/TGFastData-%{version}-py%{pyver}.egg-info
+%{__python} setup.py install --skip-build --root %{buildroot}
+%check
+%{__python} setup.py test
%clean
rm -rf %{buildroot}
@@ -47,10 +52,15 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
+%doc README.txt LICENSE.txt
%{python_sitelib}/%{module}/
-%{python_sitelib}/TGFastData-%{version}-py%{pyver}.egg-info
+%{python_sitelib}/TGFastData-*.egg-info
%changelog
+* Fri Jul 15 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.9a7-0.1.a7
+- "New" upstream.release
+- Many patches to fix bugs
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9a6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
@@ -77,7 +87,7 @@ rm -rf %{buildroot}
* Tue Oct 14 2006 Luke Macken <lmacken at redhat.com> - 0.9a6-4
- Fix Source0
-- Own %%{python_sitelib}/%{module}
+- Own %%{python_sitelib}/%%{module}
- Don't install unusable tests
* Tue Oct 10 2006 Luke Macken <lmacken at redhat.com> - 0.9a6-3
diff --git a/sources b/sources
index c4c2340..74e5e92 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-523bdd96bda2f505c2626051a95565d4 TGFastData-0.9a6-py2.4.egg
+0c5d9aad697adeeffa8066c722d4eb7b TGFastData-0.9a7.zip
diff --git a/tgfastdata-date-widget-fix.patch b/tgfastdata-date-widget-fix.patch
new file mode 100644
index 0000000..4abb56e
--- /dev/null
+++ b/tgfastdata-date-widget-fix.patch
@@ -0,0 +1,13 @@
+Index: TGFastData-0.9a7/tgfastdata/datawidgets.py
+===================================================================
+--- TGFastData-0.9a7.orig/tgfastdata/datawidgets.py
++++ TGFastData-0.9a7/tgfastdata/datawidgets.py
+@@ -114,7 +114,7 @@ class SaneDateConverter(validators.DateC
+ DateConverter and submit it to FormEncode.
+ """
+
+- month_style = 'dd.mm.yyy'
++ month_style = 'dd/mm/yyyy'
+ format = '%d.%m.%Y'
+
+ def __init__(self, format=None, **kw):
diff --git a/tgfastdata-foreign-key-unittest.patch b/tgfastdata-foreign-key-unittest.patch
new file mode 100644
index 0000000..5b49e98
--- /dev/null
+++ b/tgfastdata-foreign-key-unittest.patch
@@ -0,0 +1,14 @@
+Index: TGFastData-0.9a7/tgfastdata/tests/test_formmaker.py
+===================================================================
+--- TGFastData-0.9a7.orig/tgfastdata/tests/test_formmaker.py
++++ TGFastData-0.9a7/tgfastdata/tests/test_formmaker.py
+@@ -18,7 +18,8 @@ class TestSQLObjectWidgets(DBTest):
+ assert isinstance(fields[2], widgets.CalendarDatePicker)
+ assert fields[3].name == "friends"
+ assert isinstance(fields[3].validator, formencode.ForEach)
+- assert fields[4].name == "company"
++ assert fields[4].label == "Company"
++ assert fields[4].name == "companyID"
+ assert len(fields[4].options) > 0
+ assert fields[5].name == "status"
+ assert isinstance(fields[5], widgets.SingleSelectField)
diff --git a/tgfastdata-requires.patch b/tgfastdata-requires.patch
new file mode 100644
index 0000000..cd0d6eb
--- /dev/null
+++ b/tgfastdata-requires.patch
@@ -0,0 +1,8 @@
+diff -up TGFastData-0.9a7/setup.py.bak TGFastData-0.9a7/setup.py
+--- TGFastData-0.9a7/setup.py.bak 2011-07-15 11:16:29.930857680 -0700
++++ TGFastData-0.9a7/setup.py 2011-07-15 11:16:46.916721145 -0700
+@@ -1,3 +1,4 @@
++__requires__ = ['TurboGears']
+ from setuptools import setup, find_packages
+ from pkg_resources import DistributionNotFound
+
More information about the scm-commits
mailing list