Re: Packaging Python extensions and applications

2016-04-15 Thread Andreas Tille
On Fri, Apr 15, 2016 at 04:37:28PM +0200, Julien Lamy wrote:
> > @@ -4,3 +4,4 @@ set -e
> >  
> >  dpkg --listfiles odil | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm 
> > -f >&2
> >  
> > +#DEBHELPER#
> 
> The documentation I found about this is a bit scarce: is it a
> placeholder that various dh_XXX tools will replace by some boilerplate code?

Yes.  Just mind the following rule: If you have no good reason to drop
this boilerplate just add it.  Specifically for library packages it
is definitely needed and its in generall totally harmless.
 
> Done: my various pbuilders still build successfully so that was an easy
> addition.

:-)

Kind regards

   Andreas. 

-- 
http://fam-tille.de



Re: Packaging Python extensions and applications

2016-04-15 Thread Julien Lamy
Le 15/04/2016 07:37, Andreas Tille a écrit :
> On Thu, Apr 14, 2016 at 04:14:08PM +0200, Julien Lamy wrote:
>>
>> If the package looks OK, could I ask for a sponsored upload?

Thanks for the upload!

> Please note my change
> 
> diff --git a/debian/odil.postinst b/debian/odil.postinst
> index 84f293d..84dcb24 100644
> --- a/debian/odil.postinst
> +++ b/debian/odil.postinst
> @@ -13,3 +13,5 @@ case "$1" in
>  exit 1
>  ;;
>  esac
> +
> +#DEBHELPER#
> diff --git a/debian/odil.prerm b/debian/odil.prerm
> index acfa16c..b29da18 100644
> --- a/debian/odil.prerm
> +++ b/debian/odil.prerm
> @@ -4,3 +4,4 @@ set -e
>  
>  dpkg --listfiles odil | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f 
> >&2
>  
> +#DEBHELPER#

The documentation I found about this is a bit scarce: is it a
placeholder that various dh_XXX tools will replace by some boilerplate code?

> As a final hint:  Please try injecting
> 
>export DEB_BUILD_MAINT_OPTIONS = hardening=+all
> 
> in your d/rules file.  This might help against the lintian info about
> hardening.

Done: my various pbuilders still build successfully so that was an easy
addition.

Cheers,
-- 
Julien



Re: Packaging Python extensions and applications

2016-04-14 Thread Andreas Tille
On Thu, Apr 14, 2016 at 04:14:08PM +0200, Julien Lamy wrote:
> 
> If the package looks OK, could I ask for a sponsored upload?

I'll take this

  Andreas. 

-- 
http://fam-tille.de



Re: Packaging Python extensions and applications

2016-04-14 Thread Julien Lamy


Le 13/04/2016 18:54, Ghislain Vaillant a écrit :
> On 13/04/16 17:37, Julien Lamy wrote:
>> Dear all,
>> While preparing the package of the new upstream release of Odil, I had a
>> couple of questions regarding the packaging of Python extensions and
>> applications. I've read the Debian Python Policy and the Python Style
>> Guides on wiki.debian.org, but I'm not sure my current solution (cf.
>> https://anonscm.debian.org/cgit/debian-med/odil.git/tree/debian) is
>> correct, although Lintian does not complain.
>>
>> To recap, Odil is a C++ 11 library, now with Python wrappers using
>> Boost.Python; no pure Python code appear in the wrappers, only the C++
>> extension. A CLI tool has also been added, in pure Python, using the
>> wrappers. I've created two new packages: python-odil for the wrappers,
>> and odil for the application. I'm wondering about the following points:
>>
>> 1. The current package is Python 2 only. Should I work on Python 3
>> compatibility, or could the package stay as Python 2 only (for now)?
> 
> Python 3 compatibility would be nice to have at some point, since
> Python 2 has an expiration date.

OK, I'll work on this upstream.

> 
>> 2. I'm getting a warning regarding ${python:Depends}: since everything
>> works and I'm build-depending on libboost-python-dev, I've ignored it.
>> Are my dependencies correct?
> 
> You can have a look at opengm, which provides similar bindings via
> Boost.Python.

Thanks for the pointer, I've made a few modifications to my d/control
and d/rules.

>> 3. The CLI application is split in multiple files: I've copied what dput
>> (https://sources.debian.net/src/dput/0.9.6.4/) is doing (main script in
>> usr/bin and other files in usr/share/odil, postinst and prerm to handle
>> bytecode). Is this OK, or is there a better way to do it?
> 
> Sounds ok to me. Can you run the application successfully with this
> setup?

Yes: I get expected results with a minimal setup (packaging and testing
in separate pbuilders).

If the package looks OK, could I ask for a sponsored upload?

Thanks!
-- 
Julien



Re: Packaging Python extensions and applications

2016-04-13 Thread Ghislain Vaillant

On 13/04/16 17:37, Julien Lamy wrote:

Dear all,
While preparing the package of the new upstream release of Odil, I had a
couple of questions regarding the packaging of Python extensions and
applications. I've read the Debian Python Policy and the Python Style
Guides on wiki.debian.org, but I'm not sure my current solution (cf.
https://anonscm.debian.org/cgit/debian-med/odil.git/tree/debian) is
correct, although Lintian does not complain.

To recap, Odil is a C++ 11 library, now with Python wrappers using
Boost.Python; no pure Python code appear in the wrappers, only the C++
extension. A CLI tool has also been added, in pure Python, using the
wrappers. I've created two new packages: python-odil for the wrappers,
and odil for the application. I'm wondering about the following points:

1. The current package is Python 2 only. Should I work on Python 3
compatibility, or could the package stay as Python 2 only (for now)?


Python 3 compatibility would be nice to have at some point, since
Python 2 has an expiration date.


2. I'm getting a warning regarding ${python:Depends}: since everything
works and I'm build-depending on libboost-python-dev, I've ignored it.
Are my dependencies correct?


You can have a look at opengm, which provides similar bindings via
Boost.Python.


3. The CLI application is split in multiple files: I've copied what dput
(https://sources.debian.net/src/dput/0.9.6.4/) is doing (main script in
usr/bin and other files in usr/share/odil, postinst and prerm to handle
bytecode). Is this OK, or is there a better way to do it?


Sounds ok to me. Can you run the application successfully with this
setup?

Ghis



Packaging Python extensions and applications

2016-04-13 Thread Julien Lamy
Dear all,
While preparing the package of the new upstream release of Odil, I had a
couple of questions regarding the packaging of Python extensions and
applications. I've read the Debian Python Policy and the Python Style
Guides on wiki.debian.org, but I'm not sure my current solution (cf.
https://anonscm.debian.org/cgit/debian-med/odil.git/tree/debian) is
correct, although Lintian does not complain.

To recap, Odil is a C++ 11 library, now with Python wrappers using
Boost.Python; no pure Python code appear in the wrappers, only the C++
extension. A CLI tool has also been added, in pure Python, using the
wrappers. I've created two new packages: python-odil for the wrappers,
and odil for the application. I'm wondering about the following points:

1. The current package is Python 2 only. Should I work on Python 3
compatibility, or could the package stay as Python 2 only (for now)?
2. I'm getting a warning regarding ${python:Depends}: since everything
works and I'm build-depending on libboost-python-dev, I've ignored it.
Are my dependencies correct?
3. The CLI application is split in multiple files: I've copied what dput
(https://sources.debian.net/src/dput/0.9.6.4/) is doing (main script in
usr/bin and other files in usr/share/odil, postinst and prerm to handle
bytecode). Is this OK, or is there a better way to do it?

Cheers,
-- 
Julien