Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2023 13:27:08 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 24104f31e4d4 - main - irc/py-sopel: Runtime fix
Message-ID:  <202311201327.3AKDR8fN023254@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=24104f31e4d4d0ecadca630027d8fb28bef6ca6d

commit 24104f31e4d4d0ecadca630027d8fb28bef6ca6d
Author:     Jesús Daniel Colmenares Oviedo <DtxdF@disroot.org>
AuthorDate: 2023-11-20 13:23:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-11-20 13:26:49 +0000

    irc/py-sopel: Runtime fix
    
    Bump portrevision
    
    PR:             272629
    Approved by:    Submitter is maintainer
---
 irc/py-sopel/Makefile                     |  6 +++++
 irc/py-sopel/files/patch-requirements.txt | 37 -------------------------------
 irc/py-sopel/files/sopel-config.py        |  6 +++++
 irc/py-sopel/files/sopel-plugins.py       |  6 +++++
 irc/py-sopel/files/sopel.py               |  6 +++++
 5 files changed, 24 insertions(+), 37 deletions(-)

diff --git a/irc/py-sopel/Makefile b/irc/py-sopel/Makefile
index d9d985da2f0c..c08e5ce849ea 100644
--- a/irc/py-sopel/Makefile
+++ b/irc/py-sopel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	sopel
 DISTVERSION=	7.1.9
+PORTREVISION=	1
 CATEGORIES=	irc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -46,5 +47,10 @@ post-install:
 	@${MKDIR} ${STAGEDIR}/var/${dir}/sopel
 .endfor
 	@${MKDIR} ${STAGEDIR}/var/db/sopel/www
+.for script in sopel sopel-config sopel-plugins
+	${CP} ${FILESDIR}/${script}.py ${STAGEDIR}${PREFIX}/bin/${script}
+	@${REINPLACE_CMD} -e "s|%%PYTHON_SHEBANG%%|#!${PYTHON_CMD}|" ${STAGEDIR}${PREFIX}/bin/${script}
+	${CHMOD} 555 ${STAGEDIR}${PREFIX}/bin/${script}
+.endfor
 
 .include <bsd.port.mk>
diff --git a/irc/py-sopel/files/patch-requirements.txt b/irc/py-sopel/files/patch-requirements.txt
deleted file mode 100644
index b04c63825266..000000000000
--- a/irc/py-sopel/files/patch-requirements.txt
+++ /dev/null
@@ -1,37 +0,0 @@
---- requirements.txt.orig	2023-02-26 10:45:58 UTC
-+++ requirements.txt
-@@ -1,27 +1,8 @@
--xmltodict<0.12.0; python_version == '3.3'
--xmltodict==0.12; python_version != '3.3'
-+xmltodict
- pytz
--praw>=4.0.0,<6.0.0
--# transitive dependency of praw; v0.18 introduced f-string syntax
--update-checker<0.18; python_version < '3.6'
--geoip2<3.0; python_version <= '3.5' and python_version != '2.7'
--geoip2>=3.0,<4.0; python_version == '2.7'
--geoip2>=4.0,<5.0; python_version >= '3.6'
--# transitive dependency of geoip2; v2 dropped py2.7 & py3 < 3.6
--maxminddb<2.0; python_version < '3.6'
--ipaddress<2.0; python_version < '3.3'
--requests>=2.24.0,<3.0.0; python_version != '3.3' and python_version != '3.4'
--# py3.3 doesn't work with the chardet/charset-normalizer detection added in 2.26
--requests>=2.24.0,<2.26; python_version == '3.3'
--# py3.4 isn't supported after requests 2.21
--requests==2.21.0; python_version == '3.4'
--# transitive dependency of requests
--# 2.0 will drop EOL Python 2.7 & 3.5, just like Sopel 8 plans to
--urllib3<1.27; python_version != '3.3' and python_version != '3.4'
--urllib3<1.23; python_version == '3.3'
--urllib3<1.25; python_version == '3.4'
--dnspython<2.0; python_version == '2.7'
--dnspython<1.16.0; python_version == '3.3'
--dnspython<3.0; python_version >= '3.4'
--sqlalchemy<1.3; python_version == '3.3'
--sqlalchemy<1.4; python_version != '3.3'
-+praw
-+geoip2
-+requests
-+urllib3
-+dnspython
-+sqlalchemy
diff --git a/irc/py-sopel/files/sopel-config.py b/irc/py-sopel/files/sopel-config.py
new file mode 100755
index 000000000000..e42adc5dbe0a
--- /dev/null
+++ b/irc/py-sopel/files/sopel-config.py
@@ -0,0 +1,6 @@
+%%PYTHON_SHEBANG%%
+
+import sopel.cli.config
+
+if __name__ == "__main__":
+    sopel.cli.config.main()
diff --git a/irc/py-sopel/files/sopel-plugins.py b/irc/py-sopel/files/sopel-plugins.py
new file mode 100755
index 000000000000..4285b2e17839
--- /dev/null
+++ b/irc/py-sopel/files/sopel-plugins.py
@@ -0,0 +1,6 @@
+%%PYTHON_SHEBANG%%
+
+import sopel.cli.plugins
+
+if __name__ == "__main__":
+    sopel.cli.plugins.main()
diff --git a/irc/py-sopel/files/sopel.py b/irc/py-sopel/files/sopel.py
new file mode 100755
index 000000000000..57ebbe0e77eb
--- /dev/null
+++ b/irc/py-sopel/files/sopel.py
@@ -0,0 +1,6 @@
+%%PYTHON_SHEBANG%%
+
+import sopel.cli.run
+
+if __name__ == "__main__":
+    sopel.cli.run.main()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311201327.3AKDR8fN023254>