Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8500 > unrolled thread

unwanted python-X-dbg

Started byJeremy Sanders <jeremy@jeremysanders.net>
First post2016-05-08 10:00 +0200
Last post2016-05-08 15:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  unwanted python-X-dbg Jeremy Sanders <jeremy@jeremysanders.net> - 2016-05-08 10:00 +0200
    Re: unwanted python-X-dbg Piotr Ożarowski <piotr@debian.org> - 2016-05-08 10:30 +0200
      Re: unwanted python-X-dbg Jeremy Sanders <jeremy@jeremysanders.net> - 2016-05-08 14:30 +0200
        Re: unwanted python-X-dbg Piotr Ożarowski <piotr@debian.org> - 2016-05-08 15:30 +0200

#8500 — unwanted python-X-dbg

FromJeremy Sanders <jeremy@jeremysanders.net>
Date2016-05-08 10:00 +0200
Subjectunwanted python-X-dbg
Message-ID<rwrN7-2Jt-3@gated-at.bofh.it>
Sorry - another question about pybuild. I'm defining

export PYBUILD_NAME=veusz
export PYBUILD_DESTDIR_python3=debian/veusz
export PYBUILD_DESTDIR_python3-dbg=debian/veusz-dbg

Which seems to work with
	dh $@ --with python3 --buildsystem=pybuild

However, when rebuilding I get error messages about a 
debian/python3-veusz-dbg directory which seems to contain a second 
installation of the module:

dpkg-source: error: unwanted binary file: 
debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/icons/settings_stylesheet.png
dpkg-source: error: unwanted binary file: 
debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/icons/settings_axislabel.png
...

I'm not referring anywhere to python3-veusz-dbg. This seems to be 
generated somewhere here:

I: pybuild base:184: /usr/bin/python3-dbg setup.py install --root 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg
running install
running build
running build_py
running build_ext
running install_lib
creating /home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg
creating /home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr
creating 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib
creating 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib/python3.5
creating 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages
creating 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz
creating 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/dataimport
copying 
/home/jss/code/veusz-debian/veusz-1.24/.pybuild/pythonX.Y-dbg_3.5/build/veusz/dataimport/__init__.py 
-> 
/home/jss/code/veusz-debian/veusz-1.24/debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/dataimport

Thanks

Jeremy

[toc] | [next] | [standalone]


#8501

FromPiotr Ożarowski <piotr@debian.org>
Date2016-05-08 10:30 +0200
Message-ID<rwsg9-3in-1@gated-at.bofh.it>
In reply to#8500
[Jeremy Sanders, 2016-05-08]
> Sorry - another question about pybuild. I'm defining
> 
> export PYBUILD_NAME=veusz

thanks to this ^ one...

> export PYBUILD_DESTDIR_python3=debian/veusz
> export PYBUILD_DESTDIR_python3-dbg=debian/veusz-dbg

you don't need these ^ two, that's the default

> Which seems to work with
> 	dh $@ --with python3 --buildsystem=pybuild
> 
> However, when rebuilding I get error messages about a
> debian/python3-veusz-dbg directory which seems to contain a second
> installation of the module:
> 
> dpkg-source: error: unwanted binary file: debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/icons/settings_stylesheet.png
> dpkg-source: error: unwanted binary file: debian/python3-veusz-dbg/usr/lib/python3.5/dist-packages/veusz/icons/settings_axislabel.png
> ...

do you have python3-veusz-dbg binary package?

dh_python3 will remove non .py/.so files from -dbg's packages
dist-packages directory by default, but this looks like dpkg-source not
knowing about python3-veusz-dbg to me
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

[toc] | [prev] | [next] | [standalone]


#8502

FromJeremy Sanders <jeremy@jeremysanders.net>
Date2016-05-08 14:30 +0200
Message-ID<rww0q-6Zl-9@gated-at.bofh.it>
In reply to#8501
Thanks Piotr.

On 05/08/2016 10:28 AM, Piotr Ożarowski wrote:
> you don't need these ^ two, that's the default

ok

> do you have python3-veusz-dbg binary package?
>
> dh_python3 will remove non .py/.so files from -dbg's packages
> dist-packages directory by default, but this looks like dpkg-source not
> knowing about python3-veusz-dbg to me

control just defines veusz and veusz-dbg, so I can't see where 
python-veusz-dbg coming from. veusz has a Provides for python3-veusz.

veusz is an executable and python module (called veusz). The executable 
is probably the most important part, hence the naming of veusz, not 
python3-veusz.

I did try splitting up into python2/3 modules, executable and data 
files, but I couldn't get this to work, so I'm now trying the simplest 
option.

It's a bit hard to fix things as there's a lot of magic in the 
pybuild/dh system I don't understand.

By the way, my current work in progress is here: 
http://anonscm.debian.org/viewvc/python-apps/packages/veusz/branches/py3/

THanks

Jeremy

[toc] | [prev] | [next] | [standalone]


#8503

FromPiotr Ożarowski <piotr@debian.org>
Date2016-05-08 15:30 +0200
Message-ID<rwwWu-7Qm-11@gated-at.bofh.it>
In reply to#8502
[Jeremy Sanders, 2016-05-08]
> Thanks Piotr.
> 
> On 05/08/2016 10:28 AM, Piotr Ożarowski wrote:
> >you don't need these ^ two, that's the default
> 
> ok
> 
> >do you have python3-veusz-dbg binary package?
> >
> >dh_python3 will remove non .py/.so files from -dbg's packages
> >dist-packages directory by default, but this looks like dpkg-source not
> >knowing about python3-veusz-dbg to me
> 
> control just defines veusz and veusz-dbg, so I can't see where

PYBUILD_NAME is useless if you don't provide python-, python3 or pypy-
packages.

> python-veusz-dbg coming from. veusz has a Provides for python3-veusz.

my bet is you built it at least once before setting up PYBUILD_DESTDIR
so these filse are leftovers and, if you rm -rf debian/python-veusz-dbg
they will not be regenerated.


> veusz is an executable and python module (called veusz). The executable is
> probably the most important part, hence the naming of veusz, not
> python3-veusz.

/me puts his evil general hat on

if there's one tiny (or even empty) file in dist-packages directory:
IT'S A LIBRARY! (and binary package name should start with "python")

/me takes the hat off

Why don't you install thes files into /usr/lib/veusz/ ?
Both the normal .so and the debug one (PYBUILD_DESTDIR=debian/veusz and
PYBUILD_INSTALL_ARGS=--install-lib=/usr/lib/veusz/) and move debug .so
file later to veuzsz-dbg package

> By the way, my current work in progress is here:
> http://anonscm.debian.org/viewvc/python-apps/packages/veusz/branches/py3/

please don't hardcode pybuild's internal paths, I will change them from
time to time :P

Index: debian/rules
===================================================================
--- debian/rules	(revision 13177)
+++ debian/rules	(working copy)
@@ -8,12 +8,6 @@
 
 export PYBUILD_NAME=veusz
 
-PYVERS = $(shell py3versions -r -v)
-
-# Callable functions to determine the correct PYTHONPATH
-pythonpath = $$(ls -d $(CURDIR)/.pybuild/pythonX.Y_$(1)/build)
-pythonpath_dbg = $$(ls -d $(CURDIR)/.pybuild/pythonX.Y-dbg_$(1)/build)
-
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
@@ -35,25 +29,8 @@
 	dh_sip3
 
 override_dh_auto_test:
-# Run self tests. The current directory is used as the resource
-# directory as veusz hasn't been installed when this is run.
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
-	set -e -x;\
-	for py in $(PYVERS); do \
-		LC_ALL=C \
-		PYTHONPATH=$(call pythonpath,$$py) \
-		VEUSZ_RESOURCE_DIR=. \
-			xvfb-run -a \
-			--server-args "-screen 0 640x480x24" \
-			python$$py tests/runselftest.py ;\
-		LC_ALL=C \
-		PYTHONPATH=$(call pythonpath_dbg,$$py) \
-		VEUSZ_RESOURCE_DIR=. \
-			xvfb-run -a \
-			--server-args "-screen 0 640x480x24" \
-			python$$py-dbg tests/runselftest.py ;\
-	done
-endif
+	VEUSZ_RESOURCE_DIR=. xvfb-run -a --server-args "-screen 0 640x480x24" \
+	dh_auto_test -- --system=custom --test-args='{interpreter} {dir}/tests/runselftest.py'
 
 override_dh_strip:
 	dh_strip -pveusz --dbg-package=veusz-dbg
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web