Re: [yocto] Trying to tweak a build with a setup.cfg file

2013-08-20 Thread Paul D. DeRocco
Well, I hate to say it, but this didn't work. The setup.cfg file ended up
in the same place, even though I did a clean and a cleansstate on the
python-matplotlib recipe.

The log shows it searching for setup.cfg, so it is definitely separating
the subdir= option from the name. And it's not complaining about not
finding it. So it's acting like it's ignoring the option.

Google didn't turn up any official documentation on this option, but
showed a modest amount of discussion of it, along with a 2009 patch to
base.bbclass which implements the creation and switching to of the new
directory:

http://lists.openembedded.org/pipermail/openembedded-commits/2009-January
/097189.html

Yet this doesn't look remotely like my base.bbclass, which is much shorter
than 725 lines, and doesn't contain any code like this. In the intervening
years, this may well have been moved into some other module, but it's
acting like there is a generic routine that parses name=value options into
a list, but doesn't give you an error if nothing uses the option, and
nothing is using it.

This is a Gumstix build based on the Danny branch, by the way, which isn't
the latest and greatest, but it's not four years old either.

So I decided to try what I mentioned in the last message, which is simply
to mimic the fragment of the directory tree in my metadata, creating a
file called python-matplotlib/matplotlib-1.1.0/setup.cfg, and putting this
in the recipe:

SRC_URI += file://matplotlib-${PV}/setup.cfg

It worked.

I suspect what happened is that support for the subdir= option on local
files was added in 2009, then someone thought, why have this obscure
syntax? Simpler to impose the directory structure on the local files in
the metadata, allow file:// to refer to any pathname, not just a filename,
and have the file copy routine create any necessary subdirectories in the
build tree. So they took that option out. Just a guess.

That said, although the setup.cfg file did cause the necessary module to
be compiled, the compile failed for unrelated reasons. If it's not one
thing, it's another. And I rather doubt anyone around here has ever used
Yocto to build the GDK backend for matplotlib, so I don't know who to ask
about this.

-- 

Ciao,   Paul D. DeRocco
Paulmailto:pdero...@ix.netcom.com 
  

 -Original Message-
 From: yocto-boun...@yoctoproject.org 
 [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Chris Larson
 Sent: Monday, August 19, 2013 4:37 PM
 To: Paul D. DeRocco
 Cc: yocto
 Subject: Re: [yocto] Trying to tweak a build with a setup.cfg file
 
 
 On Mon, Aug 19, 2013 at 3:52 PM, Paul D. DeRocco 
 pdero...@ix.netcom.com wrote:
 
 
   I'm trying to build python-matplotlib from the Danny branch of
   meta-openembedded/meta-oe/recipes-devtools/python. I 
 need to add a
   setup.cfg file to tweak the build, but I don't know how 
 to get it into the
   right place.
   
   I put the setup.cfg into a python-matplotlib 
 subdirectory in my recipes
   directory, and added a python-matplotlib_1.1.0.bbappend 
 file which
   contains the following lines:
   
   FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}:
   PRINC := ${@int(PRINC) + 2}
   SRC_URI += file://setup.cfg
   
   The file is being copied into
   
 .../work/armv7a-vfp-neon-poky-linux-gnueabi/python-matplotlib-1.1.0-r3
   rather than
   
 .../work/armv7a-vfp-neon-poky-linux-gnueabi/python-matplotlib-
 1.1.0-r3/mat
   plotlib-1.1.0 where it needs to be. How do I push it 
 down a level?
 
 
 By default, anything in SRC_URI goes into ${WORKDIR}, not 
 ${S}. You should be able to change this like so:
 
 SRC_URI += file://setup.cfg;subdir=matplotlib-${PV}
 -- 
 Christopher Larson
 clarson at kergoth dot com
 Founder - BitBake, OpenEmbedded, OpenZaurus
 Maintainer - Tslib
 Senior Software Engineer, Mentor Graphics 
 

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Trying to tweak a build with a setup.cfg file

2013-08-20 Thread Chris Larson
On Mon, Aug 19, 2013 at 11:40 PM, Paul D. DeRocco pdero...@ix.netcom.comwrote:

 I suspect what happened is that support for the subdir= option on local
 files was added in 2009, then someone thought, why have this obscure
 syntax? Simpler to impose the directory structure on the local files in
 the metadata, allow file:// to refer to any pathname, not just a filename,
 and have the file copy routine create any necessary subdirectories in the
 build tree. So they took that option out. Just a guess.


We've always supported directories in file:// uris. The unpacking process
was moved from base.bbclass into the bitbake fetchers. See
https://github.com/openembedded/bitbake/blob/master/lib/bb/fetch2/__init__.py#L1234-L1240.
Not sure why it didn't work for you, though. I'm guessing it has to do with
the way it changes the current working directory before running the
command, rather than directly altering the destination directory — if the
command being run uses an absolute path, the current working directory
wouldn't affect anything. *shrug*
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Trying to tweak a build with a setup.cfg file

2013-08-19 Thread Chris Larson
On Mon, Aug 19, 2013 at 3:52 PM, Paul D. DeRocco pdero...@ix.netcom.comwrote:

 I'm trying to build python-matplotlib from the Danny branch of
 meta-openembedded/meta-oe/recipes-devtools/python. I need to add a
 setup.cfg file to tweak the build, but I don't know how to get it into the
 right place.

 I put the setup.cfg into a python-matplotlib subdirectory in my recipes
 directory, and added a python-matplotlib_1.1.0.bbappend file which
 contains the following lines:

 FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}:
 PRINC := ${@int(PRINC) + 2}
 SRC_URI += file://setup.cfg

 The file is being copied into
 .../work/armv7a-vfp-neon-poky-linux-gnueabi/python-matplotlib-1.1.0-r3
 rather than
 .../work/armv7a-vfp-neon-poky-linux-gnueabi/python-matplotlib-1.1.0-r3/mat
 plotlib-1.1.0 where it needs to be. How do I push it down a level?


By default, anything in SRC_URI goes into ${WORKDIR}, not ${S}. You should
be able to change this like so:

SRC_URI += file://setup.cfg;subdir=matplotlib-${PV}
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto