Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247204 - dev-python/django-1.0.2 version bump
Summary: dev-python/django-1.0.2 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Python Gentoo Team
URL: http://www.djangoproject.com/weblog/2...
Whiteboard:
Keywords:
: 254848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-17 14:13 UTC by Julian Golderer
Modified: 2009-02-15 17:25 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
django-1.0.2.ebuild (django-1.0.2.ebuild,2.00 KB, text/plain)
2008-12-30 22:11 UTC, Matt Summers (RETIRED)
Details
added RESTRICT="test" to avoid build time testing since that is unavailable in the relese tarball. (django-1.0.2.ebuild,1.99 KB, text/plain)
2009-01-05 04:14 UTC, Matt Summers (RETIRED)
Details
This includes a first attempt at integrating webapp eclass to facilitate easy install of django admin media in a webroot. (django-1.0.2.ebuild,2.20 KB, text/plain)
2009-01-13 22:50 UTC, Matt Summers (RETIRED)
Details
jmbvicetto's work - fixing my bad business. (django-1.0.2.ebuild,1.90 KB, text/plain)
2009-01-14 00:05 UTC, Matt Summers (RETIRED)
Details
Now with e{info, log, warn} (django-1.0.2-r1.ebuild,2.42 KB, text/plain)
2009-01-14 01:46 UTC, Matt Summers (RETIRED)
Details
Improved django-1.0.2 ebuild (django-1.0.2.ebuild,2.61 KB, text/plain)
2009-01-14 09:47 UTC, Nirbheek Chauhan (RETIRED)
Details
diff to Matt's ebuild (django-ebuild-improved.diff,2.88 KB, patch)
2009-01-14 09:48 UTC, Nirbheek Chauhan (RETIRED)
Details | Diff
working with some minor alterations detailed above (django-1.0.2.ebuild,2.70 KB, text/plain)
2009-01-14 19:56 UTC, Matt Summers (RETIRED)
Details
ESV_REPO_URI problem fixed, bash-completion_pkg_postinst added (django-1.0.2.ebuild,2.66 KB, text/plain)
2009-01-19 12:37 UTC, Nirbheek Chauhan (RETIRED)
Details
Django successful merge log (with docs+tests) (django-merge.log,639.50 KB, text/plain)
2009-01-21 04:33 UTC, Nirbheek Chauhan (RETIRED)
Details
Fixed the ebuild to byte-compile django source on installation. (django-1.0.2.ebuild,2.70 KB, text/plain)
2009-02-10 19:16 UTC, Richard Anderson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Golderer 2008-11-17 14:13:14 UTC
django 1.0.1 available since 15.11.08

Reproducible: Always
Comment 1 Dominik Kozaczko 2008-11-22 18:13:55 UTC
Version 1.0.2 has been issued lately. 1.0.1 was not properly packaged (some files from the tree were missing)
Comment 2 Johan Bergström 2008-11-27 13:38:07 UTC
A simple ebuild bump worked for me.
Comment 3 Patrick Lauer gentoo-dev 2008-12-07 11:16:53 UTC
< SRC_URI="http://media.djangoproject.com/releases/${PV}/Django-${PV}.tar.gz"                  
---                                                                                            
> SRC_URI="http://media.djangoproject.com/releases/${PV}/Django-${PV}-final.tar.gz"            
28c28                                                                                          
< S="${WORKDIR}/${P/#d/D}"                                                                     
---
> S="${WORKDIR}/${P/#d/D}-final"

That fixes SRC_URI and workdir.
src_unpack no longer needed
src_test seems broken and no longer needed

I'd commit it if I didn't get these warnings:

bzip2: Can't open input file /var/tmp/portage/dev-python/django-1.0.2/image/usr/share/doc/django-1.0.2/misc: No such file or directory.
for all doc subdirs.
Comment 4 Matt Summers (RETIRED) gentoo-dev 2008-12-30 22:10:04 UTC
Patrick,

I think you can go ahead & commit. The bzip thing you are referring to happens on the 1.0 ebuild too. I think this is caused by the removal of the docs when USE="-doc" which I imagine will be rather common.

The patch that pythonhead wrote is no longer needed as it was accepted upstream. Please see here for reference: http://code.djangoproject.com/ticket/8865

Tested on hardened amd64.

Attaching the new ebuild, feel free to adjust it.
Comment 5 Matt Summers (RETIRED) gentoo-dev 2008-12-30 22:11:19 UTC
Created attachment 176915 [details]
django-1.0.2.ebuild
Comment 6 Patrick Lauer gentoo-dev 2009-01-04 21:26:16 UTC
>>> Source compiled.
python: can't open file 'test/runtests.py': [Errno 2] No such file or directory
 *
 * ERROR: dev-python/django-1.0.2 failed.

Not sure what's up with the tests, looks like they moved to a different dir and something is wrong with the ebuild

Someone please test with FEATURES="test" and make me happy :)
Comment 7 Matt Summers (RETIRED) gentoo-dev 2009-01-05 04:14:28 UTC
Created attachment 177441 [details]
added RESTRICT="test" to avoid  build time testing since that is unavailable in the relese tarball.
Comment 8 Priit Laes (IRC: plaes) 2009-01-12 10:46:21 UTC
(In reply to comment #7)
> Created an attachment (id=177441) [edit]
> added RESTRICT="test" to avoid  build time testing since that is unavailable in
> the relese tarball.
> 

This ebuild does not check whether >=python-2.5 has been compiled with USE="sqlite3"
Comment 9 Matt Summers (RETIRED) gentoo-dev 2009-01-13 19:55:10 UTC
*** Bug 254848 has been marked as a duplicate of this bug. ***
Comment 10 Matt Summers (RETIRED) gentoo-dev 2009-01-13 22:50:06 UTC
Created attachment 178426 [details]
This includes a first attempt at integrating webapp eclass to facilitate easy install of django admin media in a webroot.  

This includes a first attempt at integrating webapp eclass to facilitate easy install of django admin media in a webroot.  It works, though I think only for amd64 since I am manually cd-ing into the dir in the sandbox where the media is.
Prob should add: 
if amd64 foo
if x86 bar
or something.

Lemme know what you think.  This will make django even more awesome on Gentoo. (IMHO)
Comment 11 Matt Summers (RETIRED) gentoo-dev 2009-01-14 00:05:18 UTC
Created attachment 178430 [details]
jmbvicetto's work - fixing my bad business.

Clean up by jmbvicetto, Many thanks
Comment 12 Matt Summers (RETIRED) gentoo-dev 2009-01-14 01:46:59 UTC
Created attachment 178455 [details]
Now with e{info, log, warn}

Added information to the ebuild.  The post install test still needs some love, but it builds perfectly on amd64.
Comment 13 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-01-14 09:47:38 UTC
Created attachment 178464 [details]
Improved django-1.0.2 ebuild

Working src_test plus other fixes (diff attached below)
Comment 14 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-01-14 09:48:05 UTC
Created attachment 178466 [details, diff]
diff to Matt's ebuild
Comment 15 Matt Summers (RETIRED) gentoo-dev 2009-01-14 19:54:45 UTC
The latest version of the ebuild fails because its missing ESVN_REPO_URI.
 So I did this:
ESVN_REPO_URI="http://code.djangoproject.com/svn/${PN}/tags/releases/${PV}/tests/"

Seems a bit redundant as that appears in the src_test section too.

Also, I was thinking about the way that webapp-config manages the media files.  With the current ebuild it grabs the media dir, which causes an extra dir to be created when webapp-config -I is called. Yielding the following:

webapp-config -I -h temp_django -d admin django 1.0.2

/var/www/temp_django/htdocs/admin/media/{css,img,js}

I am not too happy with this, so I changed the ebuild to just grab the dirs inside media resulting in the following:

webapp-config -I -h temp_django -d admin django 1.0.2

/var/www/temp_django/htdocs/admin/{css,img,js}

I like the latter behavior better, but I want feedback on this.

Many thanks to nirbeek for making the ebuild EAPI2 & other fixes.
Comment 16 Matt Summers (RETIRED) gentoo-dev 2009-01-14 19:56:13 UTC
Created attachment 178502 [details]
working with some minor alterations detailed above
Comment 17 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-01-19 12:37:05 UTC
Created attachment 178976 [details]
ESV_REPO_URI problem fixed, bash-completion_pkg_postinst added

Self-explanatory -- also has the change matt made for webapp insinto -r

Problem was that subversion_pkg_preinst() was trying some weird stuff -- override it.
Comment 18 Patrick Lauer gentoo-dev 2009-01-20 19:54:35 UTC
Writing /var/tmp/portage/dev-python/django-1.0.2/image/usr/lib64/python2.5/site-packages/Django-1.0.2_final-py2.5.egg-info                
install: omitting directory `docs/_ext'                                                                                                   
install: omitting directory `docs/_static'                                                                                                
install: omitting directory `docs/_templates'                                                                                             
install: omitting directory `docs/faq'                                                                                                    
install: omitting directory `docs/howto'                                                                                                  
install: omitting directory `docs/internals'                                                                                              
install: omitting directory `docs/intro'                                                                                                  
install: omitting directory `docs/man'
install: omitting directory `docs/misc'
install: omitting directory `docs/obsolete'
install: omitting directory `docs/ref'
install: omitting directory `docs/releases'
install: omitting directory `docs/topics'
 * ebuild fault: file '/usr/portage/dev-python/django/files/postinstall-en.txt' not found
 * Please report this as a bug at http://bugs.gentoo.org/
 *
 * ERROR: dev-python/django-1.0.2 failed.

Guys. You didn't really test that, did you? ;)
Now go fix it so I can be happy!
Comment 19 Patrick Lauer gentoo-dev 2009-01-20 21:12:32 UTC
No idea what you did there with webapp-config :) Uncommenting that one line "fixes" the problem

Also:

Traceback (most recent call last):                                                                                                        
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/tests/regressiontests/views/tests/i18n.py", line 17, in test_setlang                                                                                                                                       
    response = self.client.post('/views/i18n/setlang/', data=post_data)                                                                   
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/django/test/client.py", line 292, in post                        
    return self.request(**r)                                                                                                              
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/django/core/handlers/base.py", line 86, in get_response          
    response = callback(request, *callback_args, **callback_kwargs)                                                                       
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/django/views/i18n.py", line 27, in set_language                  
    if lang_code and check_for_language(lang_code):                                                                                       
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/django/utils/translation/__init__.py", line 91, in check_for_language                                                                                                                                      
    return real_check_for_language(lang_code)                                                                                             
  File "/var/tmp/portage/dev-python/django-1.0.2/work/Django-1.0.2-final/django/utils/translation/trans_real.py", line 335, in check_for_language
    if gettext_module.find('django', globalpath, [to_locale(lang_code)]) is not None:
  File "/usr/lib64/python2.5/gettext.py", line 437, in find
    for nelang in _expand_lang(lang):
  File "/usr/lib64/python2.5/gettext.py", line 132, in _expand_lang
    locale = normalize(locale)
  File "/usr/lib64/python2.5/locale.py", line 307, in normalize
    fullname = localename.translate(_ascii_lower_map)
TypeError: character mapping must return integer, None or unicode

----------------------------------------------------------------------
Ran 535 tests in 881.378s

FAILED (errors=1)
Destroying test database...
 *
 * ERROR: dev-python/django-1.0.2 failed.
Comment 20 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-01-21 04:27:31 UTC
(In reply to comment #18)
>  * ebuild fault: file '/usr/portage/dev-python/django/files/postinstall-en.txt'
> not found
> 
> Guys. You didn't really test that, did you? ;)
> Now go fix it so I can be happy!
> 

You dope, just put an empty file for that to test it (that's what I did) :p

Matt, you *did* forget to attach the postinstall-en.txt documentation *stab*

About the test failure, I didn't see that failure when I ran the tests (twice). I'll check again with USE=doc and FEATURES=test
Comment 21 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-01-21 04:33:14 UTC
Created attachment 179131 [details]
Django successful merge log (with docs+tests)

(In reply to comment #19)
> ----------------------------------------------------------------------
> Ran 535 tests in 881.378s
> 
> FAILED (errors=1)
> Destroying test database...

Attached build log shows no test failures -- something is b0rked on your system.

The only warning I got was:

 * Cannot find file /.webapp

/me looks at Matt
Comment 22 Matt Summers (RETIRED) gentoo-dev 2009-01-21 17:52:46 UTC
So, I have not created a proper postinstall-en.txt, but I will here in a few & add it to this bug. To test I just touched the file.  Now regarding the error that Patrick is seeing is due to a locale issue.  Seems like the best way to deal with this is to LANGUAGE_CODE="en-us" in the settings created by the ebuild. So, that is easy enough.

Now, regarding the missing /.webapp I have no idea about that one. I will look into this, perhaps its something that goes in filesdir or something that webapp-config creates.
Comment 23 Matt Summers (RETIRED) gentoo-dev 2009-01-21 18:16:14 UTC
After some research & discussion on #django-dev, the error Patrick is seeing is due to a patch applied to python itself:
python-2.5.2_turkish.patch
python-2.6_turkish.patch

Apparently these patches are considered broken.  This may need a new bug filed.  What do you think about this Patrick?
Comment 24 Patrick Lauer gentoo-dev 2009-02-03 16:51:41 UTC
Committed. Have fun :)
Comment 25 Richard Anderson 2009-02-10 19:16:05 UTC
Created attachment 181563 [details]
Fixed the ebuild to byte-compile django source on installation.

This is based on the ebuild currently in the portage tree.

I also converted some of the indents from spaces to tabs to make app-vim/gentoo-syntax happy.  ;)
Comment 26 Matt Summers (RETIRED) gentoo-dev 2009-02-10 19:18:22 UTC
Please review & commit the new attached ebuild, as it fixes a small but important matter regarding the creation of .pyo files at build time.
Comment 27 Patrick Lauer gentoo-dev 2009-02-15 17:25:47 UTC
+  15 Feb 2009; Patrick Lauer <patrick@gentoo.org> +django-1.0.2-r1.ebuild:
+  Few small fixes to close #247204