Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] wicd: switch to python3 fork
@ 2022-02-03  0:45 paper42
  2022-02-21 10:10 ` [PR PATCH] [Updated] " paper42
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: paper42 @ 2022-02-03  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

There is a new pull request by paper42 against master on the void-packages repository

https://github.com/paper42/void-packages wicd-py3
https://github.com/void-linux/void-packages/pull/35368

wicd: switch to python3 fork
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Needs proper testing.

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/35368.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wicd-py3-35368.patch --]
[-- Type: text/x-diff, Size: 7590 bytes --]

From be362000ac2cddc010ba8433993db97555b5febc Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Sun, 7 Nov 2021 19:57:57 +0100
Subject: [PATCH 1/2] wicd: switch to python3 fork

* remove -gtk subpackage, it still uses python2 libraries
---
 srcpkgs/wicd-gtk                           |  1 -
 srcpkgs/wicd/INSTALL.msg                   |  9 ---
 srcpkgs/wicd/patches/03-import-wpath.patch | 51 +++++++++++++++++
 srcpkgs/wicd/template                      | 66 ++++++++--------------
 4 files changed, 75 insertions(+), 52 deletions(-)
 delete mode 120000 srcpkgs/wicd-gtk
 delete mode 100644 srcpkgs/wicd/INSTALL.msg
 create mode 100644 srcpkgs/wicd/patches/03-import-wpath.patch

diff --git a/srcpkgs/wicd-gtk b/srcpkgs/wicd-gtk
deleted file mode 120000
index f702365e0260..000000000000
--- a/srcpkgs/wicd-gtk
+++ /dev/null
@@ -1 +0,0 @@
-wicd
\ No newline at end of file
diff --git a/srcpkgs/wicd/INSTALL.msg b/srcpkgs/wicd/INSTALL.msg
deleted file mode 100644
index 3cc3a4773da7..000000000000
--- a/srcpkgs/wicd/INSTALL.msg
+++ /dev/null
@@ -1,9 +0,0 @@
-Please note that wicd does not require to have dhcpcd and/or
-wpa_supplicant services running at boot. If you are using them at
-boot, please disable them before using wicd. You can do that with:
-
-	# rm -f /var/service/{dhcpcd,wpa_supplicant}
-
-ATTENTION: to make wicd work for your user, it must be a member
-of the 'network' group. You may need 'kdesu' for privilege 
-elevation.
diff --git a/srcpkgs/wicd/patches/03-import-wpath.patch b/srcpkgs/wicd/patches/03-import-wpath.patch
new file mode 100644
index 000000000000..57c5a0ef28a0
--- /dev/null
+++ b/srcpkgs/wicd/patches/03-import-wpath.patch
@@ -0,0 +1,51 @@
+Description: Fix import path for wpath in setup.py
+Author: Axel Beckert <abe@debian.org>
+Forwarded: no
+
+Index: wicd/setup.py
+===================================================================
+--- wicd.orig/setup.py	2019-09-29 04:13:32.874964424 +0200
++++ wicd/setup.py	2019-09-29 04:13:51.127519471 +0200
+@@ -60,10 +60,10 @@
+ 
+     def run(self):
+         try:
+-            import wpath
+-        except ImportError:
++            from wicd import wpath
++        except (ImportError, ModuleNotFoundError):
+             self.run_command('configure')
+-            import wpath
++            from wicd import wpath
+             #raise Exception, 'Please run "./setup.py configure" first.'
+         _build.run(self)
+ 
+@@ -423,10 +423,10 @@
+ class install(_install):
+     def run(self):
+         try:
+-            import wpath
+-        except ImportError:
++            from wicd import wpath
++        except (ImportError, ModuleNotFoundError):
+             self.run_command('build')
+-            import wpath
++            from wicd import wpath
+ 
+         print("Using init file",(wpath.init, wpath.initfile))
+         data.extend([
+@@ -610,11 +610,11 @@
+  
+     def run(self):
+         try:
+-            import wpath
+-        except ImportError:
++            from wicd import wpath
++        except (ImportError, ModuleNotFoundError):
+             # if there's no wpath.py, then run configure+build
+             self.run_command('build')
+-            import wpath
++            from wicd import wpath
+ 
+         if not wpath.no_install_i18n:
+             if os.path.exists('translations'):
diff --git a/srcpkgs/wicd/template b/srcpkgs/wicd/template
index d4fe01b557d5..cc62e05cff3b 100644
--- a/srcpkgs/wicd/template
+++ b/srcpkgs/wicd/template
@@ -1,64 +1,46 @@
 # Template file for 'wicd'
 pkgname=wicd
 version=1.7.4
-revision=6
-hostmakedepends="python python-setuptools python-Babel"
-depends="dbus-glib dhclient ethtool net-tools python-dbus python-gobject2 python-urwid
- util-linux wireless_tools wpa_supplicant"
+revision=7
+_ver=$version+tb2+2019.09.18git2e0ba579-1
+wrksrc="$pkgname-debian-$_ver"
+build_style="python3-module"
+hostmakedepends="python3-setuptools python3-Babel"
+depends="dbus-glib dhclient ethtool net-tools python3-dbus python3-gobject
+ python3-urwid util-linux wireless_tools wpa_supplicant"
 conf_files="
-	/etc/dbus-1/system.d/wicd.conf
-	/etc/wicd/encryption/templates/active"
+ /etc/dbus-1/system.d/wicd.conf
+ /etc/wicd/encryption/templates/active"
 short_desc="Open source wired and wireless network manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="http://wicd.sourceforge.net"
-distfiles="http://launchpad.net/wicd/1.7/${version}/+download/wicd-${version}.tar.gz"
-checksum=67989614004773db349791c37675efb914d084bdb221356a05e4369c35e7eb62
-python_version=2
+distfiles="https://salsa.debian.org/debian/wicd/-/archive/debian/$_ver/wicd-debian-$_ver.tar.gz"
+checksum=bbcba281ad78421567625057d7b1a3aac6e9f32c817ce8bf1179945f2737e777
 
 do_build() {
-	python2 setup.py configure --verbose --no-install-init \
+	python3 setup.py configure --verbose --no-install-init \
 		--resume=/usr/share/wicd/scripts \
 		--suspend=/usr/share/wicd/scripts \
-		--python=/usr/bin/python2 --lib=/usr/lib \
+		--python=/usr/bin/python3 --lib=/usr/lib \
 		--sbin=/usr/bin --distro=arch \
 		--no-install-gnome-shell-extensions \
 		--wicdgroup=network
 }
-do_install() {
-	python2 setup.py install --root=${DESTDIR}
-
-	vinstall other/wicd.desktop 644 usr/share/applications
-	vinstall other/wicd-tray.desktop 644 usr/share/applications
 
+post_install() {
 	# Copy configuration to force use of dhclient.
 	vinstall ${FILESDIR}/manager-settings.conf 755 etc/wicd
 
-	vmkdir usr/lib/wicd
-	vcopy "build/lib/wicd/*.py" usr/lib/wicd
-	chmod 755 ${DESTDIR}/usr/lib/wicd/*.py
-	vsv wicd
+	rm -r ${DESTDIR}/etc/xdg
+	rm ${DESTDIR}/usr/bin/wicd-{client,gtk}
+	rm -r ${DESTDIR}/usr/share/{applications,pixmaps,icons}
+	rm -r ${DESTDIR}/usr/share/wicd/{icons,gtk}
+	rm -r ${DESTDIR}/usr/share/doc/wicd/{AUTHORS,CHANGES,INSTALL,LICENSE}
+	rm ${DESTDIR}/usr/share/man/man1/wicd-client.1
+	rm ${DESTDIR}/usr/share/man/nl/man1/wicd-client.1
+	rm -r ${DESTDIR}/usr/lib/pm-utils
 
-	rm -rf ${DESTDIR}/lib
-	rm -rf ${DESTDIR}/usr/share/doc
-	rm -rf ${DESTDIR}/etc/logrotate.d
-	rm -rf ${DESTDIR}/usr/lib/pm-utils
-}
-
-wicd-gtk_package() {
-	depends="wicd>=${version} pygtk python-notify shared-mime-info desktop-file-utils hicolor-icon-theme"
-	short_desc+=" - GTK UI"
-	pycompile_dirs="usr/share/wicd/gtk"
-	pkg_install() {
-		vmove etc/xdg
-		vmove usr/bin/wicd-client
-		vmove usr/bin/wicd-gtk
-		vmove usr/share/applications
-		vmove usr/share/pixmaps
-		vmove usr/share/icons
-		vmove usr/share/wicd/icons
-		vmove usr/share/wicd/gtk
-		vmove usr/share/man/man1/wicd-client.1
-		vmove usr/share/man/nl/man1/wicd-client.1
-	}
+	rm -r ${DESTDIR}/lib
+	vsv wicd
 }

From 928368c38e070438337396a4247a8b25d3d6c6a0 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Thu, 3 Feb 2022 01:43:46 +0100
Subject: [PATCH 2/2] removed-packages: remove wicd-gtk

---
 srcpkgs/removed-packages/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 551d4d6db41a..07d7f656e7cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,7 +1,7 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
 version=0.1
-revision=58
+revision=59
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -350,6 +350,7 @@ replaces="
  vte290<=0.36.5_5
  vte<=0.28.2_16
  w_scan<=20170107_1
+ wicd-gtk<=1.7.4_6
  wireguard-go<=0.0.20181222_2
  wireshark-gtk<=3.0.7_1
  xlennart<=1.1.1_1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-03 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  0:45 [PR PATCH] wicd: switch to python3 fork paper42
2022-02-21 10:10 ` [PR PATCH] [Updated] " paper42
2022-02-27 11:51 ` paper42
2022-03-03 19:27 ` paper42
2022-03-03 19:35 ` [PR PATCH] [Merged]: " paper42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).