pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/url2pkg



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Oct  5 22:02:32 UTC 2019

Modified Files:
        pkgsrc/pkgtools/url2pkg: Makefile PLIST
        pkgsrc/pkgtools/url2pkg/files: setuptools.py url2pkg.py url2pkg_test.py

Log Message:
pkgtools/url2pkg: update to 19.3.2

Changes since 19.3.1 (only to the Python implementation):

* In Python packages, the variables LICENSE, HOMEPAGE and COMMENT are
  filled from their counterparts in setup.py, no matter whether
  the package uses setuptools or distutils.core.

* For buildlink3 dependencies, the variables BUILDLINK_DEPENDS and
  BUILDLINK_API_DEPENDS are added to the package Makefile.

* The DESCR and PLIST files are only created if they are missing.
  Existing files are not overwritten.

* Packages that contain .po files will set USE_PKGLOCALEDIR=yes.
  Before, only packages that contained .mo or .gmo did that.

* More download URLs from SourceForge can be handled.

* SourceForge packages get their HOMEPAGE set correctly.

* When matching the URL against the MASTER_SITE_* variables, the
  protocol is ignored. This allows https URLs to use the
  MASTER_SITE_GNU, which still uses http.

* Python packages from GitHub only get their MASTER_SITES converted to
  PyPI if they can be actually downloaded from there as well. This
  check was missing before.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 pkgsrc/pkgtools/url2pkg/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/pkgtools/url2pkg/PLIST
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/url2pkg/files/setuptools.py
cvs rdiff -u -r1.14 -r1.15 pkgsrc/pkgtools/url2pkg/files/url2pkg.py
cvs rdiff -u -r1.13 -r1.14 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/url2pkg/Makefile
diff -u pkgsrc/pkgtools/url2pkg/Makefile:1.104 pkgsrc/pkgtools/url2pkg/Makefile:1.105
--- pkgsrc/pkgtools/url2pkg/Makefile:1.104      Sat Oct  5 19:24:35 2019
+++ pkgsrc/pkgtools/url2pkg/Makefile    Sat Oct  5 22:02:32 2019
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.104 2019/10/05 19:24:35 rillig Exp $
+# $NetBSD: Makefile,v 1.105 2019/10/05 22:02:32 rillig Exp $
 
-PKGNAME=       url2pkg-19.3.1
+PKGNAME=       url2pkg-19.3.2
 CATEGORIES=    pkgtools
 
 MAINTAINER=    rillig%NetBSD.org@localhost
@@ -41,6 +41,8 @@ do-install:
        ${INSTALL_DATA} ${WRKSRC}/Build.pm ${DESTDIR}${PREFIX}/lib/url2pkg/Module/
        ${INSTALL_DATA} ${WRKSRC}/MakeMaker.pm ${DESTDIR}${PREFIX}/lib/url2pkg/ExtUtils/
        ${INSTALL_DATA} ${WRKSRC}/setuptools.py ${DESTDIR}${PREFIX}/lib/url2pkg/
+       ${INSTALL_DATA} /dev/null ${DESTDIR}${PREFIX}/lib/url2pkg/distutils/__init__.py
+       ${INSTALL_DATA} ${WRKSRC}/setuptools.py ${DESTDIR}${PREFIX}/lib/url2pkg/distutils/core.py
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/pkgtools/url2pkg/PLIST
diff -u pkgsrc/pkgtools/url2pkg/PLIST:1.6 pkgsrc/pkgtools/url2pkg/PLIST:1.7
--- pkgsrc/pkgtools/url2pkg/PLIST:1.6   Thu Oct  3 09:37:40 2019
+++ pkgsrc/pkgtools/url2pkg/PLIST       Sat Oct  5 22:02:32 2019
@@ -1,7 +1,9 @@
-@comment $NetBSD: PLIST,v 1.6 2019/10/03 09:37:40 rillig Exp $
+@comment $NetBSD: PLIST,v 1.7 2019/10/05 22:02:32 rillig Exp $
 bin/url2pkg
 bin/url2pkg-py
 lib/url2pkg/ExtUtils/MakeMaker.pm
 lib/url2pkg/Module/Build.pm
+lib/url2pkg/distutils/__init__.py
+lib/url2pkg/distutils/core.py
 lib/url2pkg/setuptools.py
 man/man8/url2pkg.8

Index: pkgsrc/pkgtools/url2pkg/files/setuptools.py
diff -u pkgsrc/pkgtools/url2pkg/files/setuptools.py:1.4 pkgsrc/pkgtools/url2pkg/files/setuptools.py:1.5
--- pkgsrc/pkgtools/url2pkg/files/setuptools.py:1.4     Thu Oct  3 16:32:47 2019
+++ pkgsrc/pkgtools/url2pkg/files/setuptools.py Sat Oct  5 22:02:32 2019
@@ -1,4 +1,4 @@
-# $NetBSD: setuptools.py,v 1.4 2019/10/03 16:32:47 rillig Exp $
+# $NetBSD: setuptools.py,v 1.5 2019/10/05 22:02:32 rillig Exp $
 
 # This is a drop-in replacement for the setuptools Python module. Instead
 # of actually searching for the dependencies, it extracts the dependency
@@ -41,6 +41,7 @@ def url2pkg_print_license(license):
 
 
 def setup(**kwargs):
+    url2pkg_print_depends('DEPENDS', kwargs.get('requires', []))  # for distutils.core
     url2pkg_print_depends('DEPENDS', kwargs.get('install_requires', []))
     url2pkg_print_depends('TEST_DEPENDS', kwargs.get('tests_require', []))
     url2pkg_print_depends('BUILD_DEPENDS', kwargs.get('extras_require', {}).get('dev', []))

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.14 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.15
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.14       Sat Oct  5 21:05:50 2019
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Sat Oct  5 22:02:32 2019
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.14 2019/10/05 21:05:50 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.15 2019/10/05 22:02:32 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -146,7 +146,7 @@ class Lines:
                 $
                 '''
             m = re.search(pattern, line)
-            if m and m[1].lstrip('#') == varname:
+            if m and m[1].lstrip('#') == varname.lstrip('#'):
                 varassigns.append(Varassign(i, *m.groups()))
         return varassigns
 
@@ -454,7 +454,7 @@ class Generator:
 
         subprocess.check_call([up.editor, makefile])
 
-        up.bmake('distinfo', 'extract')
+        up.bmake('clean', 'distinfo', 'extract')
 
         return initial_lines
 

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.13 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.14
--- pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.13  Sat Oct  5 21:05:50 2019
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py       Sat Oct  5 22:02:32 2019
@@ -1,4 +1,4 @@
-# $NetBSD: url2pkg_test.py,v 1.13 2019/10/05 21:05:50 rillig Exp $
+# $NetBSD: url2pkg_test.py,v 1.14 2019/10/05 22:02:32 rillig Exp $
 
 import pytest
 from url2pkg import *
@@ -640,6 +640,7 @@ def test_Adjuster_read_dependencies():
         'A line that is not a dependency at all',
         '',
         'var\tHOMEPAGE\thttps://homepage.example.org/',
+        'var\t#LICENSE\tBSD # TODO: too unspecific',
         ''
     ]
     env = {'URL2PKG_DEPENDENCIES': '\n'.join(child_process_output)}
@@ -659,7 +660,10 @@ def test_Adjuster_read_dependencies():
         '# TODO: does-not-exist>=1.0',
     ]
     assert adjuster.test_depends == ['pkglint>=0:../../pkgtools/pkglint']
-    assert adjuster.update_vars == {'HOMEPAGE': 'https://homepage.example.org/'}
+    assert adjuster.update_vars == {
+        'HOMEPAGE': 'https://homepage.example.org/',
+        '#LICENSE': 'BSD # TODO: too unspecific',
+    }
 
 
 def test_Adjuster_read_dependencies__lookup_with_prefix():
@@ -1184,11 +1188,12 @@ def test_Adjuster_adjust_pkg_config__bot
     assert str_vars(adjuster.extra_vars) == ['PKGCONFIG_OVERRIDE+=library.pc.in']
 
 
-def test_Adjuster__adjust_homepage():
+def test_Adjuster_generate_lines():
     url = 'https://dummy.example.org/package-1.0.tar.gz'
     adjuster = Adjuster(up, url, Lines())
     adjuster.makefile_lines = Generator(url).generate_Makefile()
     adjuster.update_vars['HOMEPAGE'] = 'https://example.org/'
+    adjuster.update_vars['#LICENSE'] = 'BSD # TODO: too unspecific'
     adjuster.depends.append('dependency>=0:../../category/dependency')
     adjuster.todos.append('Run pkglint')
 
@@ -1204,7 +1209,7 @@ def test_Adjuster__adjust_homepage():
         'MAINTAINER=     INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost',
         'HOMEPAGE=       https://example.org/',
         'COMMENT=        TODO: Short description of the package',
-        '#LICENSE=       # TODO: (see mk/license.mk)',
+        '#LICENSE=       BSD # TODO: too unspecific',
         '',
         '# TODO: Run pkglint',
         '',
@@ -1395,7 +1400,7 @@ def test_main__valid_URL():
         '',
     ]
     assert up.err.written() == [
-        f'url2pkg: running bmake (\'distinfo\', \'extract\') in \'{up.pkgdir}\'',
+        f'url2pkg: running bmake (\'clean\', \'distinfo\', \'extract\') in \'{up.pkgdir}\'',
         'url2pkg: Adjusting the Makefile',
     ]
 



Home | Main Index | Thread Index | Old Index