Using Fedora for Gnome development...

Darryl L. Pierce mcpierce at gmail.com
Wed Apr 3 13:18:33 UTC 2013


On Tue, Apr 02, 2013 at 04:40:03PM -0400, Darryl L. Pierce wrote:
> On Tue, Apr 02, 2013 at 03:50:26PM -0400, Colin Walters wrote:
> > On Tue, 2013-04-02 at 15:31 -0400, Darryl L. Pierce wrote:
> > 
> > > When python3 is installed then, with both projects, Cmake finds Python
> > > 3. 
> > 
> > This seems like either a bug in Cmake or your project (not sure which) -
> > if it's possible to explicitly specify that you want Python 2, then you
> > should be doing so.  Likewise, if a project wants Python 3, you should
> > also explicitly say so, at least in the build configuration (spec file,
> > bitbake recipe, debian/rules etc.).
> > 
> > Basically while it's sometimes sane for a component to auto-detect from
> > the environment which Python to use, you should generally configure it
> > explicitly to use whichever one you want.
> > 
> > See also:
> > https://mail.gnome.org/archives/desktop-devel-list/2012-November/msg00014.html
> > 
> > Where the conclusion for GNOME was that modules should accept
> > --with-python to specify exactly which Python they want.  See also
> > http://pkgs.fedoraproject.org/cgit/pygobject3.git/tree/pygobject3.spec#n163
> > which is accomplishing this in a slightly different way.
> 
> I found the problem, but it seems to be in Cmake.
> 
> find_package(PythonInterp 2.7 REQUIRED)
> 
> works as expected and finds Python 2.7. However:
> 
> find_package(PythonLibs 2.7 REQUIRED)
> 
> _always_ comes back with the Python 3 library instead of the 2.7
> library.

Bingo!

http://bugzilla.redhat.com/show_bug.cgi?id=876118

-- 
Darryl L. Pierce <mcpierce at gmail.com>
http://mcpierce.multiply.com/
"What do you care what people think, Mr. Feynman?"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20130403/3d673ec3/attachment.sig>


More information about the devel mailing list