Joining DMPT and PAPT

2018-10-03 Thread Peter Pentchev
Hi,

Thanks for all your work on packaging Python-related things!

I find myself doing more and more Python work on my own, so I thought
I might also contribute to the Debian packaging.  The first benefit
would be to bring my gitless package under the PAPT umbrella, but
I also have a couple of Python modules (some of which I've written
myself) as candidates for DPMT packaging.

My salsa login is roam.

I have read the Python policy and I agree with it, even though I do
share the concerns expressed by David Bremner recently, namely
the fact that the policy still mentions Alioth and still refers to
git-dpm, even though many packages have already been migrated away
from it and to the streamlined layout supported by gbp.  I see that
the Alioth/Salsa thing is in the process of being addressed by
https://salsa.debian.org/python-team/tools/python-modules/merge_requests/1
It just might be possible, time permitting, that I'll try to sit down
and change the git-dpm language to gbp in the near future.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: Streamlining the use of Salsa CI on team packages

2019-10-15 Thread Peter Pentchev
On Mon, Oct 14, 2019 at 01:51:57PM +, PICCA Frederic-Emmanuel wrote:
> Hello,
> 
> and if at the end the upstream could take care of the Debian packaging, by 
> adding a 
> .salsa-ci.yml in the upstream directory, in order to have a feedback with 
> nice badges ?

That would mean that part of the Debian packaging is in the upstream
source with all the undesired consequences of that, like any time
a change to the Debian packaging is needed, either the upstream author
has to release a new version, or a patch needs to be added to the Debian
package, making the change not trivial to see.

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: pybuild and setup.py in unusual place

2020-05-05 Thread Peter Pentchev
On Fri, Apr 17, 2020 at 08:10:34AM +, PICCA Frederic-Emmanuel wrote:
> I found this
> 
>  --sourcedirectory=src
> 
> is it equivalent to -D
> 
> 
> subsidiary question is it possible to run a command before  all the 
> dh_auto_xxx without overrideing eveythings ?
> 
> I need to run a command whcih generate the setup.py file so I need to do
> 
> override_dh_auto_:
>do_something
>dh_auto_xxx

If you can depend on a recent enough version of pybuild (and Debian
unstable, testing, stable, and oldstable should all be okay - I only ran
across this when trying to backport stuff to Ubuntu 16.04, yeah, yeah,
I know, but customers, right?), you can set the PYBUILD_DIR variable in
the environment; take a look at
https://sources.debian.org/src/confget/2.3.4-1/debian/rules/#L33

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: Anyway to omit some tests within unittest framework?

2020-06-13 Thread Peter Pentchev
On Sat, Jun 13, 2020 at 09:05:23PM +0800, zhao feng wrote:
> Recently I want to make a debian package of a scientific computing
> library. I try to use
> pybuild in my debian/rules. I found some tests failed because the test
> code downloads some data from the internet when the test code is
> running for the first time. I want to omit these tests. However, the
> test uses Python built-in unittests I do not find any switch to omit a
> small number of tests (it seems only supporting selecting which tests
> to include). The document in pybuild mentions that it is possible for
> `pytest` framework
> (https://wiki.debian.org/Python/Pybuild#debian.2Fcontrol).
> Since pybuild wraps the command line switch of these frameworks. I
> think it is hard to find solution on pybuild level if unittests do not
> support it. As far as I can figure out, I can inject some decorator to
> the test code to omit these test functions, I do not know whether it
> is acceptable to make such "patch" in debian. I wonder if there were
> any way to deal with this kind of problems.
> 
> Some additional informations:
> https://salsa.debian.org/zhaofeng-shu33-guest/ete is the source code
> repo.

It is possible to explicitly tell pybuild to use pytest for testing; see
the PYBUILD_TEST_PYTEST variable that I use e.g. in
https://sources.debian.org/src/confget/2.3.4-1/debian/rules/#L33 and
the following couple of lines. I expect that in this case you'd want to
set the PYBUILD_TEST_ARGS variable to the arguments that pytest will be
invoked with, e.g. -k 'not something' to exclude certain tests and maybe
the path to the unit tests directory and, if really necessary,
--rootdir.

I'm sorry, I cannot do any actual tests with your package right now.
If you run into problems, I could fetch it from your Git repository and
try a couple of things, but it will have to wait a day or two.

Hope that helps!

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Bug#1006606: ITP: python-cfg-diag -- common configuration-storage class with a .diag() method

2022-02-28 Thread Peter Pentchev
Package: wnpp
Severity: wishlist
Owner: Peter Pentchev 
X-Debbugs-Cc: debian-de...@lists.debian.org, debian-python@lists.debian.org, 
r...@debian.org

* Package name: python-cfg-diag
  Version : 0.2.0
  Upstream Author : Peter Pentchev 
* URL : https://github.com/storpool/python-cfg_diag
* License : BSD-2-clause
  Programming Lang: Python
  Description : common configuration-storage class with a .diag() method

 This module provides four classes that may be used as base classes for
 storing program runtime configuration with a `verbose` boolean field.
 The classes provide a `.diag(msg)` method that decides whether to
 output the provided message based on the value of the object's
 `verbose` field.

I intend to maintain this package within the Python packaging team.


signature.asc
Description: PGP signature


Re: Package builds on pbuilder but not on the autobuilders

2025-01-02 Thread Peter Pentchev
On Thu, Jan 02, 2025 at 03:17:20PM +0100, Elena ``of Valhalla'' Grandi wrote:
> Hello
> 
> I'm trying to understand what's happening to fpdf2:
> 
> https://tracker.debian.org/fpdf2
> 
> Before the upload I've built it with ``gbp buildpackage --git-pbuilder``
> and a freshly updated sid image, and the build was successful, but then
> I get
> 
> https://buildd.debian.org/status/package.php?p=fpdf2
> 
> with the error:
>
> = 1289 passed, 52 skipped, 3 xfailed, 13 warnings in 187.91s (0:03:07) 
> =
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
> 3.12" returned exit code 13
> make[1]: *** [debian/rules:12: override_dh_auto_test] Error 25
> 
> for comparison, in the pbuilder log there is:
> 
> = 1289 passed, 52 skipped, 3 xfailed, 13 warnings in 171.69s (0:02:51) 
> =
> 
> and the tests are considered successful, and the build continues.
> 
> (I've also tried a local run of ``autopkgtest ./ -- qemu
> ../../autopkgtest-unstable.img``, again with a freshly updated image,
> and that also considers the tests to be passing, with the same results)
> 
> What am I doing wrong?

The "1289 passed, 52 skipped, etc" line is the output of pytest run
with Python 3.12. Before that, pybuild ran pytest with Python 3.13,
and one of the tests failed there; look for 'frozen posixpath'
(without the quotes) in the build log.

Unfortunately, the failure message from pytest is surprisingly unhelpful;
I would have expected it to display the posixpath object as a string,
so one can figure out what the "filename" was instead of the current
Python source file.

I may try reproducing this locally, but I will not be able to do that
until tomorrow at least.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org pe...@morpheusly.com
PGP key:https://www.ringlet.net/roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature