Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 2C8141A923C for ; Sat, 1 Jan 2022 15:05:01 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 2E27D84D53; Sat, 1 Jan 2022 15:05:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 66DD884D50 for ; Sat, 1 Jan 2022 15:04:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 827uSJYs2wU1 for ; Sat, 1 Jan 2022 15:04:58 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id D37FC84D22 for ; Sat, 1 Jan 2022 15:04:58 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id C0A59FAEC; Sat, 1 Jan 2022 15:04:58 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1641049498259380" MIME-Version: 1.0 Date: Sat, 1 Jan 2022 15:04:58 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/url2pkg/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20220101150458.C0A59FAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1641049498259380 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1641049498259380 Content-Disposition: inline Content-Length: 1971 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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', + # 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' --_----------=_1641049498259380--