Re: How to build both python 2 and 3 bindings from autotools?
On 01/26/2017 12:10 AM, Peter Hutterer wrote: Before I start hacking up something nasty I figured it's better to ask: how do I build both py2 and py3 bindings from a package using autotools (i.e. AM_PATH_PYTHON)? If these packages aren't too bugged, using 2 separate build trees and setting some environment vars should be sufficent. Ralf ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: How to build both python 2 and 3 bindings from autotools?
On Thu, 2017-01-26 at 09:10 +1000, Peter Hutterer wrote: > Before I start hacking up something nasty I figured it's better to > ask: how > do I build both py2 and py3 bindings from a package using autotools > (i.e. > AM_PATH_PYTHON)? I think it's better to not use automake's stuff for this and use distutils/setuptools (this is btw, how gpgme and rpm does). gpgme also integrates it into makefiles, but that's something what I would like to not deal with... in RPM we just run pythonX setup.py build/install during build/install process. > > So far my idea revolves around installing both python-devel packages > and > overriding PYTHON in each %build , etc. But maybe > there's a > simpler solution? > > Package in question is evemu and yes, we are also the upstream > maintainers > so if there's a more sensible solution we can move that into > upstream. > > Thanks > > Cheers, > Peter > ___ > devel mailing list -- devel@lists.fedoraproject.org > To unsubscribe send an email to devel-le...@lists.fedoraproject.org ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: How to build both python 2 and 3 bindings from autotools?
On Thursday, January 26, 2017 1:27:00 AM CET Zbigniew Jędrzejewski-Szmek wrote: > On Thu, Jan 26, 2017 at 09:10:30AM +1000, Peter Hutterer wrote: > > Before I start hacking up something nasty I figured it's better to ask: how > > do I build both py2 and py3 bindings from a package using autotools (i.e. > > AM_PATH_PYTHON)? > > > > So far my idea revolves around installing both python-devel packages and > > overriding PYTHON in each %build , etc. But maybe there's a > > simpler solution? > That's what we did in systemd. Splitting out the python bindings into > a separate package cut down on the build time a lot. There's also quite old feature bug against automake: https://bugzilla.redhat.com/show_bug.cgi?id=533920 Pavel ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: How to build both python 2 and 3 bindings from autotools?
On Thu, Jan 26, 2017 at 09:10:30AM +1000, Peter Hutterer wrote: > Before I start hacking up something nasty I figured it's better to ask: how > do I build both py2 and py3 bindings from a package using autotools (i.e. > AM_PATH_PYTHON)? > > So far my idea revolves around installing both python-devel packages and > overriding PYTHON in each %build , etc. But maybe there's a > simpler solution? > > Package in question is evemu and yes, we are also the upstream maintainers > so if there's a more sensible solution we can move that into upstream. I'd suggest splitting the bindings out into a completely independant source package and uploading that to PyPi. That facilitates people using python virtualenvs to easily build the binding against arbitrary python versions as many times as they like, as well as packaging it against both py2+3 concurrently in Fedora. Bonus points if you can make the python binding able to dynamically build against multiple different versions of the C library. This is the approach we took for libvirt when adding py3 support, rather than try to hack something up with python in-tree to the main C library. Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o-http://search.cpan.org/~danberr/ :| ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: How to build both python 2 and 3 bindings from autotools?
On Thu, Jan 26, 2017 at 09:10:30AM +1000, Peter Hutterer wrote: > Before I start hacking up something nasty I figured it's better to ask: how > do I build both py2 and py3 bindings from a package using autotools (i.e. > AM_PATH_PYTHON)? > > So far my idea revolves around installing both python-devel packages and > overriding PYTHON in each %build , etc. But maybe there's a > simpler solution? That's what we did in systemd. Splitting out the python bindings into a separate package cut down on the build time a lot. Zbyszek ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: How to build both python 2 and 3 bindings from autotools?
On 26/01/17 00:10, Peter Hutterer wrote: Before I start hacking up something nasty I figured it's better to ask: how do I build both py2 and py3 bindings from a package using autotools (i.e. AM_PATH_PYTHON)? So far my idea revolves around installing both python-devel packages and overriding PYTHON in each %build , etc. But maybe there's a simpler solution? Just an idea, nothing tested... but what about hacking AM_PATH_PYTHON2/AM_PATH_PYTHON3 macros? Just my 5 öre --alec ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
How to build both python 2 and 3 bindings from autotools?
Before I start hacking up something nasty I figured it's better to ask: how do I build both py2 and py3 bindings from a package using autotools (i.e. AM_PATH_PYTHON)? So far my idea revolves around installing both python-devel packages and overriding PYTHON in each %build , etc. But maybe there's a simpler solution? Package in question is evemu and yes, we are also the upstream maintainers so if there's a more sensible solution we can move that into upstream. Thanks Cheers, Peter ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org