> Thanks, but your diff does not include the distinfo change. :)
Thanks for reminding, it didn't get merged locally in my ports. Added.
> If you want to amend COMMENT fine (no real opinion about the
> previous/new COMMENT). But please do not gratuitously change the
> existing whitespace, it messes up reviews and cvs blame.
Changed, as requested. I reverted the comment too, because I like the
old comment despite the discrepancy to the description published on PyPI
now.
> Can't really test with a partial diff, but is that patch really needed?
Without the patch:
pyport$ FLAVOR=python3 make test
===> Building for py3-phonenumbers-8.10.3
Traceback (most recent call last):
File "./setup.py", line 48, in <module>
long_description = readme.read()
File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
5585: ordinal not in range(128)
Traceback (most recent call last):
File "./setup.py", line 48, in <module>
long_description = readme.read()
File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
5585: ordinal not in range(128)
*** Error 1 in . (/usr/ports/lang/python/python.port.mk:192
'do-build': @: ;cd
/usr/ports/pobj/py-phonenumbers-8.10.3-python3/phonenumbers-8...)
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2797
'/usr/ports/pobj/py-phonenumbers-8.10.3-python3/.build_done')
*** Error 1 in /usr/ports/mystuff/landry-test/py-phonenumbers
(/usr/ports/infrastructure/mk/bsd.port.mk:2467 'test')
The patch is not needed on version 8.10.2 (two minor revisions behind).
https://github.com/daviddrysdale/python-phonenumbers/commit/ef5608d9a3d0
NB: pyport is running in an OpenBSD VM on a Debian GNU/Linux + QEMU
host with QEMU option `-nographics`. It doesn't run X, so there's this
possible corner-case.
Index: Makefile
===================================================================
RCS file: /cvs/ports/telephony/py-phonenumbers/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 Makefile
--- Makefile 16 Nov 2018 08:48:52 -0000 1.1.1.1
+++ Makefile 4 Feb 2019 18:16:39 -0000
@@ -1,13 +1,14 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/11/16 08:48:52 jca Exp $
COMMENT = port of Google's libphonenumber library
-#'
-MODPY_EGG_VERSION = 8.9.16
+MODPY_EGG_VERSION = 8.10.4
DISTNAME = phonenumbers-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = telephony devel
+
+HOMEPAGE = https://github.com/daviddrysdale/python-phonenumbers
# Apache 2.0
PERMIT_PACKAGE_CDROM = Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/telephony/py-phonenumbers/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 distinfo
--- distinfo 16 Nov 2018 08:48:52 -0000 1.1.1.1
+++ distinfo 4 Feb 2019 18:16:39 -0000
@@ -1,2 +1,2 @@
-SHA256 (phonenumbers-8.9.16.tar.gz) = 5GCnHBK558V+2dJ+KVPQMY/nWNUIkla7pB3QtRdzVbE=
-SIZE (phonenumbers-8.9.16.tar.gz) = 2912838
+SHA256 (phonenumbers-8.10.4.tar.gz) = EncGsXQ9LAz1db4CUmLJ5F5off69SxFMojHJ3x5xOHQ=
+SIZE (phonenumbers-8.10.4.tar.gz) = 2888075
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-setup_py 4 Feb 2019 18:16:39 -0000
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+From 9008606f7ef341167ae106da52b65c0166a67e0a Mon Sep 17 00:00:00 2001
+From: "Juuso \"Linda\" Lapinlampi" <[email protected]>
+Date: Mon, 4 Feb 2019 13:06:21 +0000
+Subject: [PATCH] setup.py: Read README.md as a UTF-8 file
+
+open()'s encoding is platform-dependent. Building from source would fail
+on OpenBSD (FTBFS), where the encoding defaults to ascii and not UTF-8.
+
+Fixup to commit ef5608d9a3d0.
+---
+ python/setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+---
+Forwarded: yes
+
+---
+Index: setup.py
+--- setup.py.orig
++++ setup.py
+@@ -16,6 +16,7 @@
+ # limitations under the License.
+
+ import distutils.core
++import io
+ import sys
+ # Importing setuptools adds some features like "setup.py test", but
+ # it's optional so swallow the error if it's not there.
+@@ -44,7 +45,7 @@ if not lite:
+ except ImportError:
+ lite = True
+
+-with open("README.md", "r") as readme:
++with io.open("README.md", mode="r", encoding="utf-8") as readme:
+ long_description = readme.read()
+
+ # Various parameters depend on whether we are the lite package or not