Re: Sponsorship request: python-ping3

2023-10-19 Thread Carles Pina i Estany

Hi,

On 20 Oct 2023 at 01:06:01, Pierre-Elliott Bécue wrote:
> Carles Pina i Estany  wrote on 18/10/2023 at 01:56:46+0200:

> >> Tell me when you're fine with your work and I'll upload.
> >
> > To me, it can be uploaded :-)
> >
> > Let me know if I need or can do anything else.
> 
> Uploaded, remember to put a tag on the latest commit. :)

Excellent!

Tagged via:
$ git tag -s debian/4.0.4-1
   ("Initial release" the commit message)

$ git push upstream debian/4.0.4-1

I've just realised that there is "gbp tag" :-/ I'll use it next time.
Reading the description in man gbp-tag: I was in the right branch and
the verifications would have been ok! (last commit in the debian
branch).

Thanks!

-- 
Carles Pina i Estany
https://carles.pina.cat


signature.asc
Description: PGP signature


Re: Sponsorship request: python-ping3

2023-10-19 Thread Pierre-Elliott Bécue
Carles Pina i Estany  wrote on 18/10/2023 at 01:56:46+0200:

> [[PGP Signed Part:No public key for A802884F60A55F81 created at 
> 2023-10-18T01:56:46+0200 using RSA]]
>
> Hi,
>
> On 17 Oct 2023 at 22:42:27, Carles Pina i Estany wrote:
>
> [...]
>
>> >  2. Regarding testing, this package is a bit a mess. First you probably
>> > realized that you can't run tests at buildtime because a raw socket
>> > requires root privilege. I see you designed custom autopkgtest to
>> 
>> yep...
>> 
>> [...]
>> 
>> > From there you have two options: the first one is to drop the
>> > Testsuite: field and keep the two tests you designed and call it a
>> > day, or you drop it and write a third test stanza in
>> > debian/tests/control with a shell script you'd also have to write
>> > that moves the tests to the tmp dir autopkgtest creates, puts
>> > localhost in /etc/hosts and then run tests. In that case you need
>> > to add pytest to the dependencies of this test stanza.
>> 
>> Sounds doable no problem, I'll try it this evening and see how it goes.
>
> From doable to "I'm 99% sure that not possible". I cannot send pings
> from autopkgtest in salsa with any software.
>
> Side note: I remembered that when using "needs-internet": HTTP GET
> requests (even using hostnames) works. This is my first package for
> Debian, but I've used autopkgtest with needs-internet to run a sphinx
> "linkcheck" and it was working correctly.
>
> I've checked that no ICMP replies even using the standard ping binary
> from iputils-ping:
> -
> Test-Command: set +e ; ping -c 4 8.8.8.8 ; ping -c 4 example.com ; curl -s -I 
> https://en.wikipedia.org ; curl -s -L https://en.wikipedia.org | head -5
> Depends: python3-ping3, iputils-ping, curl
> Restrictions: needs-root, needs-internet
> Features: test-name=test-real-ping
> -
> That's in:
> https://salsa.debian.org/carlespina/python-ping3/-/blob/autopkgtest-connectivity/debian/tests/control
>
> The output:
> https://salsa.debian.org/carlespina/python-ping3/-/jobs/4822521#L213
>
> 4 packets transmitted, 0 received, 100% packet loss, time 3059ms
> 4 packets transmitted, 0 received, 100% packet loss, time 3079ms
>
> Even more: I think that curl -I (--head) (HTTP HEAD) might not work? but
> curl HTTP GET works. I'm not sure about the curl -I but I don't think it
> is relevant for this discussion. Somewhere, I think, I had read
> something that it implied that autopkgtest needs-internet was using a
> proxy? I cannot find it anyway and ICMP seems that cannot be used.
>
> So, for now, I've:
> -Used wrap-and-soft (excellent!).
> -Removed "set -e" in one of my Test-Commands: it's the default in
>  autopkgtest (I discovered with the "pings..." and then documenation)
> -Fixed a cosmetic line in d/tests/control (s/features/Features)
> -Removed "Testsuite: autopkgtest-pkg-pybuild" from d/control because
>  ICMP is not available anyway
> -Ran dch -r to update the date
> -"dput --force mentors python-ping3_4.0.4-1_amd64.changes"
>
> I've also discovered that there are a few unit tests in upstream that do
> not work. Some have an easy fix, I will do a MR of the fixes that I've
> done for some of them (separately, in GitHub, not tonight).
>
>> Your call.
>> 
>> Tell me when you're fine with your work and I'll upload.
>
> To me, it can be uploaded :-)
>
> Let me know if I need or can do anything else.

Uploaded, remember to put a tag on the latest commit. :)
-- 
PEB


signature.asc
Description: PGP signature


Request to join Python Team

2023-10-19 Thread Alexander Sulfrian
Hello,

I would like to join the Python Team on Salsa. Currently I am packaging
the python package scramp. I already prepared the package in a personal
repo:

https://salsa.debian.org/animux/python-scramp

and I would like to move it to the team namespace.

After python-scramp is ready I would like to update python-pg8000 to a
more recent version as the current version in Debian is from 2016 and it
currently has a FTBFS bug.

My Salsa login is: Animux


I have read and accept the "Debian Python Team - Policy".


Thanks,
Alexander Sulfrian



Re: What is the best method to build deb package?

2023-10-19 Thread Carles Pina i Estany

Hi,

On 19 Oct 2023 at 13:08:31, Miguel de Dios Matias wrote:

> I have tiny side/pet projects in python. And they have setup.py the
> build method and I publish to pypi.
> 
> But I want to do some deb packages (for my pet projects), yes I can do
> by hand (several years ago I do a debian package for PHP app).
> 
> But What is the best method to build deb package? I look for in the

I don't know poetry or its options. I don't know what's the "best" way,
but I can tell how I start (and this is in a Debian system, gpg
configured correctly and signing the packages which you might disable).
Probably each person on the list has a different way? :-)

I'm happy to read suggestions as well or tips.

File .gbp.conf:

[import-dsc]
sign-tags = True

[DEFAULT]
pristine-tar = True
debian-branch = debian/unstable


mkdir debian_package_name
cd debian_package_name
git init
git checkout -b upstream

# I was creating a package for cloudscraper
gbp import-orig 
https://github.com/VeNoMouS/cloudscraper/archive/refs/tags/1.2.68.tar.gz
# answer the questions

export DEBEMAIL=car...@pina.cat
dh_make --createorig --packagename python-cloudscraper -p 
python-cloudscraper_1.2.68
  Package type: "p" (python)

Edit / delete files in debian/ (some are templates, some not-relevant
for the package etc.)

git add debian/*
git commit -a -m "Add initial debian/* files"
gbp buildpackage

At the end it will run "lintian". Fix errors / warnings that you will
see. But you might get *.dsc, *.deb in the parent directory where you
are

When you need to try again:
debian/rules clean ; gbp buildpackage # probably there is some options
in gbp to do this :-)

And the rest that I have is to publish this in salsa, probably not
relevant...

I hope that it helps to have a start... at least with one of the tools.

Cheers,

-- 
Carles Pina i Estany
https://carles.pina.cat


signature.asc
Description: PGP signature


What is the best method to build deb package?

2023-10-19 Thread Miguel de Dios Matias
Hi.

I have tiny side/pet projects in python. And they have setup.py the
build method and I publish to pypi.

But I want to do some deb packages (for my pet projects), yes I can do
by hand (several years ago I do a debian package for PHP app).

But What is the best method to build deb package? I look for in the
doc of poetry but there is not a method to do this kind of thing (some
years ago, I asked about this in
https://github.com/python-poetry/poetry/issues/1359) .

I found some projects about python packaging deb (but I don't know
what it is the standard or best):
 - https://github.com/p1otr/dh-python
 - https://github.com/upciti/wheel2deb
 - https://github.com/spotify/dh-virtualenv
 - https://github.com/astraw/stdeb

Regards.