Bug 807256

Summary: Review Request: python-django-mptt - Utilities for implementing Modified Preorder Tree Traversal
Product: [Fedora] Fedora Reporter: Matthias Runge <mrunge>
Component: Package ReviewAssignee: Bohuslav "Slavek" Kabrda <bkabrda>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkabrda, notting, package-review
Target Milestone: ---Flags: bkabrda: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-01 20:25:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 736776    

Description Matthias Runge 2012-03-27 11:33:52 UTC
Spec URL: http://www.matthias-runge.de/fedora/python-django-mptt.spec
SRPM URL: http://www.matthias-runge.de/fedora/python-django-mptt-0.5.2-1.fc16.src.rpm
Description: Utilities for implementing Modified Preorder Tree Traversal (MPTT)
with your Django Model classes and working with trees of Model instances.


please note: this is a review request required for renaming. 

There seems to exist a problem with django-1.4 from rawhide, so tests don't succeed in this combination. They run e.g. on f16. 
(simplejson can not be imported)

[mrunge@mrungexp SPECS]$ rpmlint ./python-django-mptt.spec ../SRPMS/python-django-mptt-0.5.2-1.fc16.src.rpm ../RPMS/noarch/python-django-mptt-0.5.2-1.fc16.noarch.rpm
2 packages and 1 specfiles checked; 0 errors, 0 warnings.

koji-scratchbuild: http://koji.fedoraproject.org/koji/taskinfo?taskID=3936102

Comment 1 Bohuslav "Slavek" Kabrda 2012-03-28 07:42:16 UTC
I'll take this one.

Comment 2 Bohuslav "Slavek" Kabrda 2012-03-28 08:04:27 UTC
Just a first catch before we repair python-django (I will do a proper review once that is fixed):
rpmbuild complains about files listed twice

warning: File listed twice: /usr/lib/python2.7/site-packages/mptt/locale/de/LC_MESSAGES/django.mo
warning: File listed twice: /usr/lib/python2.7/site-packages/mptt/locale/dk/LC_MESSAGES/django.mo
warning: File listed twice: /usr/lib/python2.7/site-packages/mptt/locale/fr/LC_MESSAGES/django.mo
warning: File listed twice: /usr/lib/python2.7/site-packages/mptt/locale/pl/LC_MESSAGES/django.mo

I'm not sure what's the proper procedure for these, because they get listed both in %{python_sitelib}/mptt and the django.lang file. But I guess excluding them in the file section and leaving it only up to django.lang is ok.
And I'm going to dive into Django to solve the simplejson problem now...

Comment 3 Matthias Runge 2012-03-28 08:17:20 UTC
Are you aware of a simple way to fix this File listed twice problem without listing every file in the files section? Something like include without? 

%exclude %{python_sitelib}/mptt/locale

excludes previously included language files.

Comment 4 Matthias Runge 2012-03-28 08:37:09 UTC
OK, fixed django, fixed twice listed files, re-enabled tests

SPEC: http://www.matthias-runge.de/fedora/python-django-mptt.spec
SRPM: http://www.matthias-runge.de/fedora/python-django-mptt-0.5.2-2.fc16.src.rpm


[mrunge@mrungexp SPECS]$ diff -u python-django-mptt.spec-1 python-django-mptt.spec
--- python-django-mptt.spec-1	2012-03-27 13:31:15.000000000 +0200
+++ python-django-mptt.spec	2012-03-28 10:33:04.485120442 +0200
@@ -4,7 +4,7 @@
 Summary:	Utilities for implementing Modified Preorder Tree Traversal
 Name:		python-django-mptt
 Version:	0.5.2
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	BSD
 Group:		Development/Libraries
 URL:		http://github.com/django-mptt/django-mptt
@@ -33,6 +33,9 @@
 %prep
 %setup -q -n %{pkgname}-%{version}
 %patch0 
+#remove unnecessary language ressources:
+# de dk,fr, pl 
+rm mptt/locale/??/LC_MESSAGES/django.po 
 
 %build
 %{__python} setup.py build
@@ -42,17 +45,23 @@
 
 %find_lang django
 
-#%check
-#cd tests
-#sh runtests.sh
+%check
+cd tests
+sh runtests.sh
 
 %files -f django.lang
 %doc LICENSE README.rst NOTES
 %{python_sitelib}/django_mptt-%{version}-py2.*.egg-info
-%{python_sitelib}/mptt
+%dir %{python_sitelib}/mptt
+%{python_sitelib}/mptt/*.py*
+%{python_sitelib}/mptt/templates
+%{python_sitelib}/mptt/templatetags
 
 %changelog
-* Mon Mar 27 2012 Matthias Runge <mrunge> - 0.5.2-1
+* Wed Mar 28 2012 Matthias Runge <mrunge> - 0.5.2-2
+- fix double included language files
+
+* Tue Mar 27 2012 Matthias Runge <mrunge> - 0.5.2-1
 - renamed to python-django-mptt
 - update to version 0.5.2

Comment 5 Bohuslav "Slavek" Kabrda 2012-03-28 08:58:50 UTC
- I don't think you need to explicitly BR: python-simplejson, as it's not the dependency of mptt itself, but of Django, so it's Django's duty to draw that in.
- The license is actually MIT - see [1]
- Since last version-release of django-mptt is 0.4.2-3, you should obsolete version-release < 0.4.2-4
- Rpmlint complains:

$ rpmlint python-django-mptt-0.5.2-2.fc17.noarch.rpm 
python-django-mptt.noarch: W: incoherent-version-in-changelog 0.5.2-1 ['0.5.2-2.fc17', '0.5.2-2']

(bump the release properly both in changelog and in release)

[1] https://fedoraproject.org/wiki/Licensing/MIT#Modern_Style_with_sublicense

Comment 6 Matthias Runge 2012-03-28 09:15:01 UTC
I thought, I did the version bump. Nevermind

SPEC: http://www.matthias-runge.de/fedora/python-django-mptt.spec
SRPM: http://www.matthias-runge.de/fedora/python-django-mptt-0.5.2-3.fc16.src.rpm


[mrunge@mrungexp SPECS]$ rpmlint python-django-mptt.spec ../RPMS/noarch/python-django-mptt-0.5.2-3.fc16.noarch.rpm ../SRPMS/python-django-mptt-0.5.2-3.fc16.src.rpm 



[mrunge@mrungexp SPECS]$ diff -u python-django-mptt.spec-2 python-django-mptt.spec
--- python-django-mptt.spec-2	2012-03-28 11:03:34.503125911 +0200
+++ python-django-mptt.spec	2012-03-28 11:10:04.949127052 +0200
@@ -1,11 +1,11 @@
 %global pkgname django-mptt
-%global obs_ver 0.4.2-3
+%global obs_ver 0.4.2-4
 
 Summary:	Utilities for implementing Modified Preorder Tree Traversal
 Name:		python-django-mptt
 Version:	0.5.2
-Release:	2%{?dist}
-License:	BSD
+Release:	3%{?dist}
+License:	MIT
 Group:		Development/Libraries
 URL:		http://github.com/django-mptt/django-mptt
 Source:		http://pypi.python.org/packages/source/d/%{pkgname}/%{pkgname}-%{version}.tar.gz
@@ -17,7 +17,6 @@
 
 # required for check-section
 BuildRequires:	python-django
-BuildRequires:	python-simplejson
 
 Requires:		python-django
 
@@ -58,8 +57,9 @@
 %{python_sitelib}/mptt/templatetags
 
 %changelog
-* Wed Mar 28 2012 Matthias Runge <mrunge> - 0.5.2-2
+* Wed Mar 28 2012 Matthias Runge <mrunge> - 0.5.2-3
 - fix double included language files
+- fix license
 
 * Tue Mar 27 2012 Matthias Runge <mrunge> - 0.5.2-1
 - renamed to python-django-mptt

Comment 7 Bohuslav "Slavek" Kabrda 2012-03-28 09:50:50 UTC
Looks fine now, this package is APPROVED.

Comment 8 Matthias Runge 2012-03-28 09:54:58 UTC
Thank you for the review!

New Package SCM Request
=======================
Package Name: python-django-mptt
Short Description: Utilities for implementing Modified Preorder Tree Traversal
Owners: mrunge
Branches: devel

Comment 9 Gwyn Ciesla 2012-03-28 12:41:02 UTC
Git done (by process-git-requests).

Comment 10 Matthias Runge 2012-06-01 20:25:26 UTC
built for f18 and django-mptt blocked from devel