pleroma.debian.social

pleroma.debian.social

hey does anyone here know how to properly package Python libraries for Debian? I've been reading the docs for several hours and I keep installing everything under /usr/local, rather than /usr blobfoxshocked
#askfedi #debian

@camelia

There is the Debian Python team policy:

https://www.debian.org/doc/packaging-manuals/python-policy/

but it's a lot to read for sth. might be easy to solve. Is your code public somewhere? I can take a look. But no promise, that I can help.

@debacle yeah sure it's https://codeberg.org/tblock/tblock. I had something that was working, but now I'm trying to do the same with my pyproject.toml (on the PR #135) but it doesn't seem to work blobfoxmelt3

@camelia

On testing the package builds for me, and does not seem to put things under /usr/local, but correctly under /usr. Still, the packaging files have some issues.

Let's start ;-)

In debian/control, I'ld try with that:

Build-Depends:
debhelper-compat (= 13),
pybuild-plugin-pyproject,
python3-all,
python3-colorama,
python3-requests,
python3-setuptools,
python3-urllib3,

E.g. "make" is always an implicit Build-Dep, no need to mention it.

tbc

@camelia

Thanks to debhelper-compat, you can

git rm debian/compat.

debian/rules can be as short as:

```
#!/usr/bin/make -f

export DH_VERBOSE=1

%:
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:
```

And the last line only disables the unit tests, so you might like to get rid of that, too.

HTH!

@debacle @camelia you'll also want Depends: ${python3:Depnds} and build-depend on dh-python

@debacle @werdahias thanks a lot for all the help! I guess I was overcomplicating everything neocat_flop_sleep​

@camelia @debacle LMK if you want to get this into Debian proper
replies
1
announces
0
likes
2

@werdahias omg that would be awesome, thanks for the offer!
Though given that I'm working on a major release (3.0.0) that will probably not be completely backwards-compatible, I would rather wait for this major release to be out. May I keep your contact and message you in the future?

@camelia I'd wait until the breaking change, feel free to text me here or at myusername@debian.org

@werdahias will do, thanks a lot! bunhdheart​