Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-26 Thread Sandro Tosi
> after thinking about this, I think the "easy" solution would be to:
>
>  * create a *backports* package, that simply embeds a backports/__init__.py
>
>  * depends on this backports package itself and simply remove 
> backports/__init__.py from backports.XXX packages.
>
> If they depend on backports, this file will will always be present, and will 
> be of for backports.xx modules.

that requires a lot of coordination with all the other backports
packages. currently (well, before tempfile) there was no package
installing backports/__init__.py and every package was (correctly)
using dh_python2 --namespace

> You would only need to remove the file from installed files in packages.
>
> I see though that you have already uploaded package, how did you handle the 
> issue?

simple, he didnt :/

Andreas, please re-upload backports.tempfile using dh_python2
--namespace so taht this package will nicely fit with the existing
backports packages.


-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
G+: https://plus.google.com/u/0/+SandroTosi



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-26 Thread Olivier Sallou


- Mail original -
> De: "Olivier Sallou" 
> À: "Andreas Tille" 
> Cc: debian-pyt...@lists.debian.org, "Debian Science List" 
> , 777...@bugs.debian.org
> Envoyé: Mardi 23 Janvier 2018 17:11:05
> Objet: Re: Next python-mote pre-condition - issue with pybuild: 
> python-backports.tempfile conflicting
> python-backports.weakref
> 
> 
> 
> - Mail original -
> > De: "Andreas Tille" 
> > À: debian-pyt...@lists.debian.org, "Debian Science List"
> > , 777...@bugs.debian.org
> > Envoyé: Lundi 22 Janvier 2018 15:04:10
> > Objet: Re: Next python-mote pre-condition - issue with pybuild:
> > python-backports.tempfile conflicting
> > python-backports.weakref
> > 
> > Hi,
> > 
> > I kept on working packaging python-moto predependencies.  I'm now
> > stumbling upon python-backports.tempfile[1] and
> > python-backports.weakref[2].  My naive packaging attempt puts
> > the modules into
> 
> well, package name should not really use dots in name, I suppose that's what
> leads to error. But don't know how to fix that with python helper... :-(
> 
> both modules use the same "base module", ie *backports* so final dest is
> correct. From a pure python point of view, you can "merge" multiple sub
> modules in the same mail module, python will manage the duplication of
> __init__.py
> 
> However, in Debian case, I do not know how this can be handled as 2 packages
> cannot hold the same file (even if __init__ is only an empty file), and at
> least one must be present (if you install only one).
> 
> Olivier
> 
> > 
> >/usr/lib/python*/dist-packages/backports
> > 
> > leaving the same package
> > 
> >/usr/lib/python3/dist-packages/backports/__init__.py

after thinking about this, I think the "easy" solution would be to:

 * create a *backports* package, that simply embeds a backports/__init__.py

 * depends on this backports package itself and simply remove 
backports/__init__.py from backports.XXX packages.

If they depend on backports, this file will will always be present, and will be 
of for backports.xx modules.

You would only need to remove the file from installed files in packages.

I see though that you have already uploaded package, how did you handle the 
issue?

Olivier

> > 
> > for both packages and thus the packages are conflicting.  I have no idea
> > why pybuild simply uses the dir backports instead of the full module
> > name nor do I have any idea how to fix this.  I tried to hack around in
> > the backports.weakref package using
> > 
> > 
> > override_dh_auto_install:
> > for dir in `find .pybuild -type d -name backports | sort | uniq` ;
> > do
> > \
> > mv $${dir} $${dir}.weakref ; \
> > done
> > dh_auto_install
> > 
> > but this rather has led to an empty package.
> > 
> > Any help is welcome
> > 
> > Andreas.
> > 
> > 
> > [1] https://salsa.debian.org/science-team/python-backports.tempfile.git
> > [2] https://salsa.debian.org/science-team/python-backports.weakref.git
> > 
> > --
> > http://fam-tille.de
> > 
> > 
> 
> 



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-26 Thread Piotr Ożarowski
> > > However, in Debian case, I do not know how this can be handled as
> > > 2 packages cannot hold the same file (even if __init__ is only an empty
> > > file), and at least one must be present (if you install only one).
> 
> The Python jargon is that the "backports" shared by backports.tempfile
> and backports.weakref is a "namespace package".
> 
> For Python 2, dh_python2 handles this: python-lazr.restfulclient and
> python-lazr.uri are an example of cooperating packages that share a
> namespace package.

FTR: If you want to use dh_python2's --namespace: make sure ALL packages
that share namespace use this feature and not a single one ships
__init__.py file.

> > I'm not a python expert but I expect the least-horrible way to do this
> > would be to ship a package that only contained the __init__. Then have
> > all the python-backports.* packages depend on it.
> 
> This is not necessary, and would probably (hopefully?) lead to rejection
> from the NEW queue.

I don't think it's a bad solution, I used it in the past for some
packages.
-- 
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-25 Thread Simon McVittie
On Thu, 25 Jan 2018 at 17:45:33 +, peter green wrote:
> > However, in Debian case, I do not know how this can be handled as
> > 2 packages cannot hold the same file (even if __init__ is only an empty
> > file), and at least one must be present (if you install only one).

The Python jargon is that the "backports" shared by backports.tempfile
and backports.weakref is a "namespace package".

For Python 2, dh_python2 handles this: python-lazr.restfulclient and
python-lazr.uri are an example of cooperating packages that share a
namespace package.

For Python >= 3.3, the __init__.py is unnecessary due to
.

> I'm not a python expert but I expect the least-horrible way to do this
> would be to ship a package that only contained the __init__. Then have
> all the python-backports.* packages depend on it.

This is not necessary, and would probably (hopefully?) lead to rejection
from the NEW queue.

smcv



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-23 Thread Olivier Sallou


- Mail original -
> De: "Andreas Tille" 
> À: debian-pyt...@lists.debian.org, "Debian Science List" 
> , 777...@bugs.debian.org
> Envoyé: Lundi 22 Janvier 2018 15:04:10
> Objet: Re: Next python-mote pre-condition - issue with pybuild: 
> python-backports.tempfile conflicting
> python-backports.weakref
> 
> Hi,
> 
> I kept on working packaging python-moto predependencies.  I'm now
> stumbling upon python-backports.tempfile[1] and
> python-backports.weakref[2].  My naive packaging attempt puts
> the modules into

well, package name should not really use dots in name, I suppose that's what 
leads to error. But don't know how to fix that with python helper... :-(

both modules use the same "base module", ie *backports* so final dest is 
correct. From a pure python point of view, you can "merge" multiple sub modules 
in the same mail module, python will manage the duplication of __init__.py

However, in Debian case, I do not know how this can be handled as 2 packages 
cannot hold the same file (even if __init__ is only an empty file), and at 
least one must be present (if you install only one).

Olivier

> 
>/usr/lib/python*/dist-packages/backports
> 
> leaving the same package
> 
>/usr/lib/python3/dist-packages/backports/__init__.py
> 
> for both packages and thus the packages are conflicting.  I have no idea
> why pybuild simply uses the dir backports instead of the full module
> name nor do I have any idea how to fix this.  I tried to hack around in
> the backports.weakref package using
> 
> 
> override_dh_auto_install:
> for dir in `find .pybuild -type d -name backports | sort | uniq` ; do
> \
> mv $${dir} $${dir}.weakref ; \
> done
> dh_auto_install
> 
> but this rather has led to an empty package.
> 
> Any help is welcome
> 
> Andreas.
> 
> 
> [1] https://salsa.debian.org/science-team/python-backports.tempfile.git
> [2] https://salsa.debian.org/science-team/python-backports.weakref.git
> 
> --
> http://fam-tille.de
> 
> 



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-22 Thread Piotr Ożarowski
[Andreas Tille, 2018-01-22]
> Hi,
> 
> I kept on working packaging python-moto predependencies.  I'm now
> stumbling upon python-backports.tempfile[1] and
> python-backports.weakref[2].  My naive packaging attempt puts
> the modules into
> 
>/usr/lib/python*/dist-packages/backports
> 
> leaving the same package
> 
>/usr/lib/python3/dist-packages/backports/__init__.py

if it's an empty file (or can be removed, as most probably in this case)
you can tell dh_python2 to handle the namespace for you with:

 override_dh_python2:
dh_python2 --namespace backports

For Python 3, __init__.py is not needed anymore, so you can simply
remove it in both packages by creating debian/python3-foo.pyremove file
with "backports/__init__.py"

> for both packages and thus the packages are conflicting.  I have no idea
> why pybuild simply uses the dir backports instead of the full module

that's how Python works, nothing to do with pybuild
-- 
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645



Bug#777089: Next python-mote pre-condition - issue with pybuild: python-backports.tempfile conflicting python-backports.weakref

2018-01-22 Thread Andreas Tille
Hi,

I kept on working packaging python-moto predependencies.  I'm now
stumbling upon python-backports.tempfile[1] and
python-backports.weakref[2].  My naive packaging attempt puts
the modules into

   /usr/lib/python*/dist-packages/backports

leaving the same package

   /usr/lib/python3/dist-packages/backports/__init__.py

for both packages and thus the packages are conflicting.  I have no idea
why pybuild simply uses the dir backports instead of the full module
name nor do I have any idea how to fix this.  I tried to hack around in
the backports.weakref package using


override_dh_auto_install:
for dir in `find .pybuild -type d -name backports | sort | uniq` ; do \
mv $${dir} $${dir}.weakref ; \
done
dh_auto_install

but this rather has led to an empty package.

Any help is welcome

Andreas.


[1] https://salsa.debian.org/science-team/python-backports.tempfile.git
[2] https://salsa.debian.org/science-team/python-backports.weakref.git

-- 
http://fam-tille.de