Diff zope-interface-7.2 with a inxi-3.3.38.1

/usr/portage/sys-apps/inxi/inxi-3.3.38.1.ebuild 2025-07-29 16:22:17.376467925 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
DISTUTILS_EXT=1
7
DISTUTILS_USE_PEP517=setuptools
8
PYPI_PN=${PN/-/.}
9
PYPI_NO_NORMALIZE=1
10
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
11

  
12
inherit distutils-r1 pypi
13

  
14
DESCRIPTION="Interfaces for Python"
15
HOMEPAGE="
16
	https://github.com/zopefoundation/zope.interface/
17
	https://pypi.org/project/zope.interface/
18
"
6
MY_PV=$(ver_rs 3 '-')
19 7

  
20
LICENSE="ZPL"
8
inherit optfeature
9

  
10
DESCRIPTION="The CLI inxi collects and prints hardware and system information"
11
HOMEPAGE="https://codeberg.org/smxi/inxi"
12
SRC_URI="https://codeberg.org/smxi/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
13
S="${WORKDIR}/${PN}"
14

  
15
LICENSE="GPL-3+"
21 16
SLOT="0"
22
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
23
IUSE="+native-extensions test"
24
RESTRICT="!test? ( test )"
25

  
26
BDEPEND="
27
	test? (
28
		dev-python/zope-event[${PYTHON_USEDEP}]
29
		dev-python/zope-testing[${PYTHON_USEDEP}]
30
	)
31
"
32

  
33
distutils_enable_tests unittest
34

  
35
src_prepare() {
36
	distutils-r1_src_prepare
37

  
38
	# strip rdep specific to namespaces
39
	sed -i -e "/'setuptools'/d" setup.py || die
40
	# force failure if extension build fails
41
	sed -i -e "/'build_ext':/d" setup.py || die
42
	if ! use native-extensions; then
43
		sed -i -e '/ext_modules=/d' setup.py || die
44
	fi
45
}
17
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
46 18

  
47
python_compile() {
48
	distutils-r1_python_compile
49
	find "${BUILD_DIR}" -name '*.pth' -delete || die
19
RDEPEND="dev-lang/perl
20
	sys-apps/pciutils
21
	"
22

  
23
src_install() {
24
	dobin ${PN}
25
	doman ${PN}.1
26
	dodoc README.txt
50 27
}
51 28

  
52
python_test() {
53
	local -x PURE_PYTHON=0
54
	if ! use native-extensions || [[ ${EPYTHON} == pypy3* ]]; then
55
		PURE_PYTHON=1
56
	fi
57

  
58
	cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
59
	distutils_write_namespace zope
60
	eunittest
29
pkg_postinst() {
30
	# All packages are in the same order as displayed by inxi --recommends
31
	# including duplicates in order to keep track of changes in the future.
32
	optfeature_header "Optional features as suggested by inxi --recommends:"
33

  
34
	optfeature "blockdev: --admin -p/-P (filesystem blocksize)" sys-apps/util-linux
35
	optfeature "bt-adapter: -E bluetooth data (if no hciconfig, btmgmt)" net-wireless/bluez-tools
36
	optfeature "btmgmt: -E bluetooth data (if no hciconfig)" net-wireless/bluez
37
	optfeature "dig: -i wlan IP" net-dns/bind-tools
38
	optfeature "dmidecode: -M if no sys machine data; -m" sys-apps/dmidecode
39
	optfeature "doas: -Dx hddtemp-user; -o file-user (alt for sudo)" app-admin/doas
40
	optfeature "fdisk: -D partition scheme (fallback)" sys-apps/util-linux
41

  
42
	# currently implicit dependency:
43
	# optfeature "file: -o unmounted file system (if no lsblk)" sys-apps/file
44
	# not packaged yet:
45
	# fruid_print: -M machine data, Elbrus only
46

  
47
	optfeature "hciconfig: -E bluetooth data (deprecated, good report)" net-wireless/bluez
48
	optfeature "hddtemp: -Dx show hdd temp, if no drivetemp module" app-admin/hddtemp
49
	optfeature "ifconfig: -i ip LAN (deprecated)" sys-apps/net-tools
50
	optfeature "ip: -i ip LAN" sys-apps/iproute2
51
	optfeature "ipmitool: -s IPMI sensors (servers)" sys-apps/ipmitool
52
	optfeature "ipmi-sensors: -s IPMI sensors (servers)" sys-libs/freeipmi
53
	optfeature "lsblk: -L LUKS/bcache; -o unmounted file system (best option)" sys-apps/util-linux
54
	optfeature "lsusb: -A usb audio; -J (optional); -N usb networking" sys-apps/usbutils
55
	optfeature "lvs: -L LVM data" sys-fs/lvm2
56
	optfeature "mdadm: -Ra advanced mdraid data" sys-fs/mdadm
57
	optfeature "modinfo: Ax; -Nx module version" sys-apps/kmod
58
	optfeature "runlevel: -I fallback to Perl" sys-apps/sysvinit
59
	optfeature "sensors: -s sensors output (optional, /sys supplies most)" sys-apps/lm-sensors
60
	optfeature "smartctl: -Da advanced data" sys-apps/smartmontools
61
	# TODO optfeature "strings: -I sysvinit version" llvm-core/llvm-toolchain-symlinks
62
	optfeature "sudo: -Dx hddtemp-user; -o file-user (try doas!)" app-admin/sudo
63
	optfeature "tree: --debugger 20,21 /sys tree" app-text/tree
64
	optfeature "udevadm: -m ram data for non-root, or no dmidecode" sys-apps/systemd
65
	optfeature "upower: -sx attached device battery info" sys-power/upower
66
	optfeature "uptime: -I uptime" sys-process/procps
67
	optfeature "eglinfo: -G X11/Wayland EGL info" x11-apps/mesa-progs
68
	optfeature "glxinfo: -G X11 GLX info" x11-apps/mesa-progs
69
	optfeature "vulkaninfo: -G Vulkan API info" dev-util/vulkan-tools
70
	optfeature "wayland-info: -G Wayland data (not for X)" app-misc/wayland-utils
71
	optfeature "wmctrl: -S active window manager (fallback)" x11-misc/wmctrl
72
	optfeature "xdpyinfo: -G (X) Screen resolution, dpi; -Ga Screen size" x11-apps/xdpyinfo
73
	optfeature "xprop: -S (X) desktop data" x11-apps/xprop
74
	optfeature "xdriinfo: -G (X) DRI driver (if missing, fallback to Xorg log)" x11-apps/xdriinfo
75
	optfeature "xrandr: -G (X) monitors(s) resolution; -Ga monitor data" x11-apps/xrandr
61 76
}
Thank you!