Bug 696485 - Review Request: django-countries - Provides a country field for Django models
Summary: Review Request: django-countries - Provides a country field for Django models
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Arun S A G
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-04-14 06:50 UTC by Rahul Sundaram
Modified: 2011-07-12 12:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-05-11 00:14:41 UTC
Type: ---
sagarun: fedora-review+
gwync: fedora-cvs+

Attachments (Terms of Use)

Description Rahul Sundaram 2011-04-14 06:50:33 UTC
Spec URL: http://sundaram.fedorapeople.org/packages/django-countries.spec
SRPM URL: http://sundaram.fedorapeople.org/packages/django-countries-1.0.5-1.fc15.src.rpm
Django application which provides country choices for use with forms, and a 
country field for models.

Comment 1 Arun S A G 2011-05-08 12:49:48 UTC
Hi Rahul,

Every thing seems fine except the rpmlint on the binary rpm

[zer0c00l@gnubox SPECS]$ rpmlint ~/rpmbuild/RPMS/noarch/django-countries-1.0.5-1.fc14.noarch.rpm 
django-countries.noarch: E: zero-length /usr/lib/python2.7/site-packages/django_countries/models.py
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

It is completely OK to have an empty models.py in a django app, On the other hand i tried removing this models.py and reinstalled this app, the test application worked fine without any issues.

Please remove the empty files by using

'find $RPM_BUILD_ROOT -size 0 -delete' at the end of install section

Comment 2 Rahul Sundaram 2011-05-08 15:40:51 UTC
I am not sure deleting this file isn't affecting the functionality somehow but for now let's go ahead with this.  Doing what you suggest would screw around with the byte code files.  I have done it differently with the same end result


Comment 3 Arun S A G 2011-05-08 17:18:21 UTC

I got that trick from http://fedoraproject.org/wiki/PackageMaintainers/Packaging_Tricks#Zero_length_files

You are correct __init__ files in python packages can be empty, if we remove those files that will screw up the package.

On the other hand, If the upstream chooses to have some code inside models.py in future (unlikely), you _might_ accidentally end up deleting it :-) 

complete review:

+ = OK
- = NA
? = issue

+ Package meets naming and packaging guidelines
+ Spec file matches base package name.
+ Spec has consistant macro usage.
+ Meets Packaging Guidelines.
+ License
+ License field in spec matches
+ License file included in package
+ Spec in American English
+ Spec is legible.

+ Sources match upstream md5sum
b3c0ac13c382ac41bff786231dc20e79  /home/zer0c00l/rpmbuild/SOURCES/django-countries-1.0.5.tar.gz

- Package needs ExcludeArch
+ BuildRequires correct
- Spec handles locales/find_lang
- Package is relocatable and has a reason to be.
+ Package has %defattr and permissions on files is good.
+ Package is code or permissible content.
- Doc subpackage needed/used.
+ Packages %doc files don't affect runtime.

- Headers/static libs in -devel subpackage.
- Spec has needed ldconfig in post and postun
- .pc files in -devel subpackage/requires pkgconfig
- .so files in -devel subpackage.
- -devel package Requires: %{name} = %{version}-%{release}
- .la files are removed.

+ Package compiles and builds on at least one arch.

+ Package has no duplicate files in %files.
+ Package doesn't own any directories other packages own.
+ Package owns all the directories it creates.
+ No rpmlint output.

- final provides and requires are sane:
(include output of for i in *rpm; do echo $i; rpm -qp --provides $i; echo =;
rpm -qp --requires $i; echo; done
manually indented after checking each line.  I also remove the rpmlib junk and
anything provided by glibc.)


+ Should build in mock.
+ Should build on all supported archs
+ Should function as described.
+ Should have sane scriptlets.
- Should have subpackages require base package with fully versioned depend.
+ Should have dist tag
+ Should package latest version
- check for outstanding bugs on package. (For core merge reviews)

Package tested and working fine with Django-1.2.5
In [2]: from users import models

In [3]from users.models import Person

In [4]:person = Person(name='Arun',country='IN')

In [5]: person.country
Out[5]: Country(code=u'IN')

In [6]: person.country.flag
Out[6]: u'/flags/in.gif'



Comment 4 Rahul Sundaram 2011-05-09 09:33:23 UTC
New Package SCM Request
Package Name: django-countries
Short Description: Provides a country field for Django models
Owners: sundaram
Branches: f15

Comment 5 Jason Tibbitts 2011-05-10 15:29:28 UTC
Git done (by process-git-requests).

Comment 6 Rahul Sundaram 2011-05-11 00:14:41 UTC
Thanks for the review,  Arun.

Comment 7 Rahul Sundaram 2011-07-12 05:27:22 UTC
Package Change Request
Package Name: django-countries
New Branches: el6
Owners: sundaram pjp

Comment 8 Gwyn Ciesla 2011-07-12 12:41:04 UTC
Git done (by process-git-requests).

Note You need to log in before you can comment on or make changes to this bug.