[python-django-countries] Initial import after rename

Bohuslav Kabrda bkabrda at fedoraproject.org
Mon Aug 20 14:18:21 UTC 2012


commit 0f09f5ff45c2d26bda1da8dfe33ede92b50f2e43
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Aug 20 16:17:54 2012 +0200

    Initial import after rename

 .gitignore                   |    2 +
 python-django-countries.spec |  100 ++++++++++++++++++++++++++++++++++++++++++
 sources                      |    2 +
 3 files changed, 104 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ae83172 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/django-countries-1.3-test_proj.tgz
+/django-countries-1.3.tar.gz
diff --git a/python-django-countries.spec b/python-django-countries.spec
new file mode 100644
index 0000000..03163c9
--- /dev/null
+++ b/python-django-countries.spec
@@ -0,0 +1,100 @@
+%global pypi_name django-countries
+%global obs_ver 1.0.5-6
+
+Name:           python-%{pypi_name}
+Version:        1.3
+Release:        1%{?dist}
+Summary:        Provides a country field for Django models
+
+Group:          Development/Languages
+License:        MIT
+URL:            http://pypi.python.org/pypi/django-countries
+Source0:        http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Steps to generate the test project: https://bitbucket.org/smileychris/django-countries/issue/18/#comment-1807293
+Source1:        %{pypi_name}-%{version}-test_proj.tgz
+
+BuildArch:      noarch
+BuildRequires:  python-setuptools
+BuildRequires:  python-devel
+BuildRequires:  python-django
+Requires:       python-django
+
+Provides:       django-countries = %{version}-%{release}
+Obsoletes:      django-countries < %{obs_ver}
+
+%description
+Django application which provides country choices for use with forms, and a 
+country field for models.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# drop empty file
+rm -rf django_countries/models.py
+
+%build
+%{__python} setup.py build
+
+%install
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+chmod +x $RPM_BUILD_ROOT%{python_sitelib}/django_countries/bin/titlecase.py
+
+%find_lang django
+
+pushd $RPM_BUILD_ROOT
+# delete the unnecessary *.po files
+find -type f -name '*.po' -exec rm {} \;
+# avoid the /usr/bin/env dependency, make the files executable
+find .%{python_sitelib}/django_countries/bin -type f -exec chmod +x {} \;
+find .%{python_sitelib}/django_countries/bin -type f -exec sed -i 's|/usr/bin/env python|%{__python}|' {} \;
+popd
+
+%check
+tar xzf %{SOURCE1}
+pushd test_proj
+# django apps are not testable without models.py file
+# this is created in setup.py install, but not present in upstream source, so create it here for tests
+touch ../django_countries/models.py
+PYTHONPATH=.. %{__python} manage.py test django_countries
+popd
+
+%files -f django.lang
+%doc LICENSE README
+%exclude %{python_sitelib}/django_countries/tests
+%dir %{python_sitelib}/django_countries/
+%{python_sitelib}/django_countries/*.py*
+%{python_sitelib}/django_countries/bin
+# own all the locale directories
+%dir %{python_sitelib}/django_countries/locale/
+%dir %{python_sitelib}/django_countries/locale/*/
+%dir %{python_sitelib}/django_countries/locale/*/*/
+%{python_sitelib}/django_countries/static
+%{python_sitelib}/*.egg-info
+
+%changelog
+* Mon Aug 20 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.3-1
+- Update to version 1.3.
+- Avoid the /usr/bin/env dependency.
+
+* Tue Aug 14 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.2-2
+- Add proper Provides and Obsoletes tags.
+
+* Mon Aug 13 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.2-1
+- Renamed to python-django-countries.
+- Updated to latest upstream.
+- Introduced %%check section.
+- Handle locale files.
+
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.5-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.5-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Jul 12 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 1.0.5-3
+- Use macros more.  Drop defattr
+
+* Sun May 08 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 1.0.5-2
+- Remove empty file
+
+* Thu Apr 14 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 1.0.5-1
+- initial spec
diff --git a/sources b/sources
index e69de29..b7946a0 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+37022208106029c0c7e9dc15bb43b290  django-countries-1.3-test_proj.tgz
+002fa3a2174e98ede9fc8d86a220b908  django-countries-1.3.tar.gz


More information about the scm-commits mailing list