pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/url2pkg/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Jan  1 15:04:58 UTC 2022

Modified Files:
        pkgsrc/pkgtools/url2pkg/files: url2pkg_test.py

Log Message:
url2pkg: test current behavior for PyPI downloads


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 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/files/url2pkg_test.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.34 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.35
--- pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.34  Sat Jan  1 14:04:11 2022
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py       Sat Jan  1 15:04:58 2022
@@ -1,4 +1,4 @@
-# $NetBSD: url2pkg_test.py,v 1.34 2022/01/01 14:04:11 rillig Exp $
+# $NetBSD: url2pkg_test.py,v 1.35 2022/01/01 15:04:58 rillig Exp $
 
 import pytest
 from url2pkg import *
@@ -600,6 +600,35 @@ def test_Generator_adjust_site_from_site
     ]
 
 
+def test_Generator_adjust_site_from_sites_mk__PyPI():
+    url = ('https://files.pythonhosted.org/'
+           + 'packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/'
+           + 'apprise-0.9.6.tar.gz')
+    generator = Generator(url)
+
+    lines = generator.generate_Makefile()
+
+    assert detab(lines) == [
+        mkcvsid,
+        '',
+        'DISTNAME=       apprise-0.9.6',
+        'CATEGORIES=     pkgtools',
+        # TODO: ${MASTER_SITE_PYPI:=a/apprise/}
+        'MASTER_SITES=   https://files.pythonhosted.org/packages/da/8b/'
+        + '218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/',
+        '',
+        'MAINTAINER=     INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost',
+        # TODO: https://pypi.org/project/apprise/
+        'HOMEPAGE=       https://files.pythonhosted.org/packages/da/8b/'
+        + '218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/',
+        'COMMENT=        TODO: Short description of the package',
+        '#LICENSE=       # TODO: (see mk/license.mk)',
+        '',
+        '# url2pkg-marker (please do not remove this line.)',
+        '.include "../../mk/bsd.pkg.mk"',
+    ]
+
+
 def test_Generator_adjust_site_from_sites_mk__R(tmp_path: Path):
     g.pkgdir = tmp_path
     url = 'http://cran.r-project.org/src/contrib/forecast_8.7.tar.gz'



Home | Main Index | Thread Index | Old Index