public inbox for gentoo-dev-announce@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ali Polatel <hawking@gentoo.org>
To: gentoo-dev-announce@lists.gentoo.org
Cc: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev-announce] Recent changes wrt python.eclass
Date: Thu, 29 May 2008 21:56:44 +0300	[thread overview]
Message-ID: <20080529185644.GB4994@trippin> (raw)

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

Hi people,

All python_mod_* functions are now ROOT aware. I've also modified them
to die if they aren't run in expected phases. Also I plan to make byte
compiling functions print a warning when *.py{c,o} are installed under
/usr/share which is a FHS violation.

The tree and python developer's guide are updated to reflect the
changes.

As a last thing, I want to give some usage notes here so it's
clear for everyone.

* If your package uses distutils.eclass, generally you have nothing to
  worry about. By default it'll byte compile python modules under
  /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}. If your package
  installs a directory with a name other than ${PN} set PYTHON_MODNAME
  to the name of directory.

* python_version should only be called if you need any of PYVER*
  variables. If your package only uses python.eclass - and not
  distutils.eclass, you need to call it when you want to use $python
  too. ( Note: Right now python_version is buggy wrt ROOT. This is the
  next thing I'm going to fix.)

* Don't call python_mod_cleanup with PYVER like:
  Wrong:
  	python_mod_cleanup \
		/usr/$(get_libdir)/python${PYVER}/site-packages/$PN
  
  This is wrong because the python version may change in the meantime.
  Instead use:
  	python_mod_cleanup \
		/usr/$(get_libdir)/python*/site-packages/$PN
  
  python_mod_cleanup has a safe default so you can usually avoid passing
  any arguments.

These are important stuff I can remember by the time I'm writing this
mail. Python devguide will be updated with these useful information
soon.

So if anything is not clear and/or you have any questions feel free to
bug/poke/stab me :-)

-- 
Regards,
Ali Polatel

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

                 reply	other threads:[~2008-05-29 19:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080529185644.GB4994@trippin \
    --to=hawking@gentoo.org \
    --cc=gentoo-dev-announce@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox