Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/py-demjson py-demjson: fix building with Pyth...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/236850c1cb76
branches:  trunk
changeset: 430989:236850c1cb76
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu May 07 09:29:04 2020 +0000

description:
py-demjson: fix building with Python 2.7; clean-up

diffstat:

 textproc/py-demjson/Makefile               |   8 ++++--
 textproc/py-demjson/PLIST                  |   6 ++--
 textproc/py-demjson/distinfo               |   3 +-
 textproc/py-demjson/patches/patch-setup.py |  32 ++++++++++++++++++++++++++++++
 4 files changed, 42 insertions(+), 7 deletions(-)

diffs (87 lines):

diff -r bf22985fac20 -r 236850c1cb76 textproc/py-demjson/Makefile
--- a/textproc/py-demjson/Makefile      Thu May 07 09:20:28 2020 +0000
+++ b/textproc/py-demjson/Makefile      Thu May 07 09:29:04 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2020/05/01 17:52:29 nia Exp $
+# $NetBSD: Makefile,v 1.2 2020/05/07 09:29:04 adam Exp $
 
 DISTNAME=      demjson-2.2.4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -10,9 +10,11 @@
 COMMENT=       Encoder, decoder, and lint/validator for JSON compliant with RFC 7159
 LICENSE=       gnu-lgpl-v3
 
+USE_LANGUAGES= # none
+
 post-install:
-       ${MV} ${DESTDIR}${PREFIX}/bin/jsonlint \
-           ${DESTDIR}${PREFIX}/bin/jsonlint-${PYVERSSUFFIX}
+       cd ${DESTDIR}${PREFIX}/bin && \
+       ${MV} jsonlint jsonlint-${PYVERSSUFFIX} || ${TRUE}
 
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r bf22985fac20 -r 236850c1cb76 textproc/py-demjson/PLIST
--- a/textproc/py-demjson/PLIST Thu May 07 09:20:28 2020 +0000
+++ b/textproc/py-demjson/PLIST Thu May 07 09:29:04 2020 +0000
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2020/05/01 17:52:29 nia Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/05/07 09:29:04 adam Exp $
 bin/jsonlint-${PYVERSSUFFIX}
-${PYSITELIB}/demjson.pyo
-${PYSITELIB}/demjson.pyc
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
 ${PYSITELIB}/${EGG_INFODIR}/top_level.txt
 ${PYSITELIB}/demjson.py
+${PYSITELIB}/demjson.pyc
+${PYSITELIB}/demjson.pyo
diff -r bf22985fac20 -r 236850c1cb76 textproc/py-demjson/distinfo
--- a/textproc/py-demjson/distinfo      Thu May 07 09:20:28 2020 +0000
+++ b/textproc/py-demjson/distinfo      Thu May 07 09:29:04 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2020/05/01 17:52:29 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/05/07 09:29:04 adam Exp $
 
 SHA1 (demjson-2.2.4.tar.gz) = 1c5d78b5616b4cc6f4d4ad35fe831bbd11aaadec
 RMD160 (demjson-2.2.4.tar.gz) = 2d5f60a791671465dc91ab370a8ad7480ed81a26
 SHA512 (demjson-2.2.4.tar.gz) = d8a1cde062d0b062bdae29b6d79ad69fb9cc185428718a0009ccbed544ed37bd354fbb86edadb56bd98183ac8636b2edae322ed19aa5f07a7b6df668c7aa0029
 Size (demjson-2.2.4.tar.gz) = 131457 bytes
+SHA1 (patch-setup.py) = a25eaed1eb2d39c08dd96c7a0a756b8fff51d155
diff -r bf22985fac20 -r 236850c1cb76 textproc/py-demjson/patches/patch-setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-demjson/patches/patch-setup.py        Thu May 07 09:29:04 2020 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/07 09:29:04 adam Exp $
+
+Always use setuptools.
+
+--- setup.py.orig      2020-05-07 09:23:44.000000000 +0000
++++ setup.py
+@@ -9,23 +9,8 @@ try:
+ except AttributeError:
+     py_major = sys.version_info[0]
+ 
+-distmech = None
+-if py_major >= 3:
+-    # Python 3, use setuptools first
+-    try:
+-        from setuptools import setup
+-        distmech = 'setuptools'
+-    except ImportError:
+-        from distutils.core import setup
+-        distmech = 'distutils'
+-else:
+-    # Python 2, use distutils first
+-    try:
+-        from distutils.core import setup
+-        distmech = 'distutils'
+-    except ImportError:
+-        from setuptools import setup
+-        distmech = 'setuptools'
++from setuptools import setup
++distmech = 'setuptools'
+ 
+ if False:
+     sys.stdout.write("Using Python:    %s\n" % sys.version.split(None,1)[0])



Home | Main Index | Thread Index | Old Index