django 1.0.1 available since 15.11.08 Reproducible: Always
Version 1.0.2 has been issued lately. 1.0.1 was not properly packaged (some files from the tree were missing)
A simple ebuild bump worked for me.
< 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.
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.
Created attachment 176915 [details] django-1.0.2.ebuild
>>> 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 :)
Created attachment 177441 [details] added RESTRICT="test" to avoid build time testing since that is unavailable in the relese tarball.
(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"
*** Bug 254848 has been marked as a duplicate of this bug. ***
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)
Created attachment 178430 [details] jmbvicetto's work - fixing my bad business. Clean up by jmbvicetto, Many thanks
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.
Created attachment 178464 [details] Improved django-1.0.2 ebuild Working src_test plus other fixes (diff attached below)
Created attachment 178466 [details, diff] diff to Matt's ebuild
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.
Created attachment 178502 [details] working with some minor alterations detailed above
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.
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!
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.
(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
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
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.
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?
Committed. Have fun :)
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. ;)
Please review & commit the new attached ebuild, as it fixes a small but important matter regarding the creation of .pyo files at build time.
+ 15 Feb 2009; Patrick Lauer <patrick@gentoo.org> +django-1.0.2-r1.ebuild: + Few small fixes to close #247204