pkgsrc-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 build with latest ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a0aad37cab9
branches:  trunk
changeset: 770657:2a0aad37cab9
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Dec 06 15:03:50 2021 +0000

description:
py-demjson: fix build with latest setuptools.

diffstat:

 textproc/py-demjson/Makefile               |  10 ++++++++--
 textproc/py-demjson/distinfo               |   4 ++--
 textproc/py-demjson/patches/patch-setup.py |  25 +++++++++++++++++++++++--
 3 files changed, 33 insertions(+), 6 deletions(-)

diffs (77 lines):

diff -r f16ecd47e17a -r 2a0aad37cab9 textproc/py-demjson/Makefile
--- a/textproc/py-demjson/Makefile      Mon Dec 06 14:59:35 2021 +0000
+++ b/textproc/py-demjson/Makefile      Mon Dec 06 15:03:50 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/05/07 09:29:04 adam Exp $
+# $NetBSD: Makefile,v 1.3 2021/12/06 15:03:50 wiz Exp $
 
 DISTNAME=      demjson-2.2.4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -12,9 +12,15 @@
 
 USE_LANGUAGES= # none
 
+.include "../../lang/python/egg.mk"
+
+.if ${PYPKGPREFIX} != "py27"
+pre-build:
+       cd ${WRKSRC} && 2to3-${PYVERSSUFFIX} -w --no-diffs jsonlint demjson.py
+.endif
+
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \
        ${MV} jsonlint jsonlint-${PYVERSSUFFIX} || ${TRUE}
 
-.include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r f16ecd47e17a -r 2a0aad37cab9 textproc/py-demjson/distinfo
--- a/textproc/py-demjson/distinfo      Mon Dec 06 14:59:35 2021 +0000
+++ b/textproc/py-demjson/distinfo      Mon Dec 06 15:03:50 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 11:23:02 nia Exp $
+$NetBSD: distinfo,v 1.5 2021/12/06 15:03:50 wiz Exp $
 
 BLAKE2s (demjson-2.2.4.tar.gz) = b57a8d984d9a0e4f7f40444a9dd7c7ed0c0ce4acf7535e4a1f845c7ac635a487
 SHA512 (demjson-2.2.4.tar.gz) = d8a1cde062d0b062bdae29b6d79ad69fb9cc185428718a0009ccbed544ed37bd354fbb86edadb56bd98183ac8636b2edae322ed19aa5f07a7b6df668c7aa0029
 Size (demjson-2.2.4.tar.gz) = 131457 bytes
-SHA1 (patch-setup.py) = a25eaed1eb2d39c08dd96c7a0a756b8fff51d155
+SHA1 (patch-setup.py) = 5297d0d861704f6f6c0b0270987d9f23392669ec
diff -r f16ecd47e17a -r 2a0aad37cab9 textproc/py-demjson/patches/patch-setup.py
--- a/textproc/py-demjson/patches/patch-setup.py        Mon Dec 06 14:59:35 2021 +0000
+++ b/textproc/py-demjson/patches/patch-setup.py        Mon Dec 06 15:03:50 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-setup.py,v 1.1 2020/05/07 09:29:04 adam Exp $
+$NetBSD: patch-setup.py,v 1.2 2021/12/06 15:03:50 wiz Exp $
 
 Always use setuptools.
 
---- setup.py.orig      2020-05-07 09:23:44.000000000 +0000
+--- setup.py.orig      2015-12-22 20:02:25.000000000 +0000
 +++ setup.py
 @@ -9,23 +9,8 @@ try:
  except AttributeError:
@@ -30,3 +30,24 @@
  
  if False:
      sys.stdout.write("Using Python:    %s\n" % sys.version.split(None,1)[0])
+@@ -33,20 +18,6 @@ if False:
+ 
+ py3extra = {}
+ 
+-if py_major >= 3:
+-    # Make sure 2to3 gets run
+-    if distmech == 'setuptools':
+-        py3extra['use_2to3'] = True
+-        #py3extra['convert_2to3_doctests'] = ['src/your/module/README.txt']
+-        #py3extra['use_2to3_fixers'] = ['your.fixers']
+-    elif distmech == 'distutils':
+-        import distutils, distutils.command, distutils.command.build_py, distutils.command.build_scripts
+-        cmdclass = {
+-            'build_py':      distutils.command.build_py.build_py_2to3,
+-            'build_scripts': distutils.command.build_scripts.build_scripts_2to3
+-            }
+-        py3extra['cmdclass'] = cmdclass
+-
+ setup( name=name,
+        version=version,
+        py_modules=[name],



Home | Main Index | Thread Index | Old Index