tech-pkg archive

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

Re: url2pkg and pypi



I tried to add py-apprise, via

- https://pypi.org/project/apprise/
- hit download files link
- grab tarball addr with "copy link"

  https://files.pythonhosted.org/packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/apprise-0.9.6.tar.gz

and then 'url2pkg' with that.   This time, it seems good.   What I got
earlier was:

  # $NetBSD$

  DISTNAME=      apprise-0.9.6
  CATEGORIES=    comms
  MASTER_SITES=  https://files.pythonhosted.org/packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/

  MAINTAINER=    gdt%NetBSD.org@localhost
  HOMEPAGE=      https://files.pythonhosted.org/packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/
  COMMENT=       Notify muliple services with one interface
  LICENSE=       mit

  # url2pkg-marker (please do not remove this line.)
  .include "../../mk/bsd.pkg.mk"

which you can find in wip at cc1cd9e7c8ee95ab8441fa2d4e9cc8679c6d7e42


I am now thinking that I somehow did not exit the editor, which seems to
show me the pre-python-transform version, but after I exited, I see that
the Makefile is very heavily modified.


One thing that could be spiffed up is to change this:

  MASTER_SITES=   https://files.pythonhosted.org/packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/

to the right PYPI incantation.


So this is likely my error, but I had no idea that after I edited and
exited the file would change.   Seems better to do that before if that's
feasible.

And here's the diff from url2pkg and the results of wizd(8) which is
unfortunately not as scalable.   wizd was woken up quickly by by commit
of a 10%-baked package, though.

Obviously categories and maintainer are fair, and I guess it pulled a
COMMENT and I wrote a different one.   There's test depends and test,
which is hard, and I'm not really sure about what's write for the
package differences (but url2pkg didn't alpha sort).

So long story short: if the MASTER_SITES were done automatically I'd be
down to nits.


--- Makefile	2021-12-30 19:56:46.034113404 -0500
+++ ../py-apprise/Makefile	2021-12-28 14:02:23.022602640 -0500
@@ -1,25 +1,29 @@
 # $NetBSD$
 
 DISTNAME=	apprise-0.9.6
-PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES=	python # TODO: add primary category
-MASTER_SITES=	https://files.pythonhosted.org/packages/da/8b/218264f5ce91df1ad27ce8021d51b747ef287627338fe05d170565358546/
+CATEGORIES=	comms
+MASTER_SITES=	${MASTER_SITE_PYPI:=a/apprise/}
 
-MAINTAINER=	INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=	gdt%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/caronc/apprise
-COMMENT=	Push Notifications that work with just about every platform!
+COMMENT=	Notify muliple services with one interface
 LICENSE=	mit
 
-BUILD_DEPENDS+=	${PYPKGPREFIX}-babel>=0:../../devel/py-babel
-DEPENDS+=	${PYPKGPREFIX}-requests>=0:../../devel/py-requests
-DEPENDS+=	${PYPKGPREFIX}-requests-oauthlib>=0:../../security/py-requests-oauthlib
-DEPENDS+=	${PYPKGPREFIX}-six>=0:../../lang/py-six
-DEPENDS+=	${PYPKGPREFIX}-click>=5.0:../../devel/py-click
-DEPENDS+=	${PYPKGPREFIX}-markdown>=0:../../textproc/py-markdown
-DEPENDS+=	# TODO: PyYAML>=0
+DEPENDS+=	${PYPKGPREFIX}-babel-[0-9]*:../../devel/py-babel
+DEPENDS+=	${PYPKGPREFIX}-click-[0-9]*:../../devel/py-click
+DEPENDS+=	${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
+DEPENDS+=	${PYPKGPREFIX}-requests-[0-9]*:../../devel/py-requests
+DEPENDS+=	${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
+DEPENDS+=	${PYPKGPREFIX}-markdown-[0-9]*:../../textproc/py-markdown
+DEPENDS+=	${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
+TEST_DEPENDS+=	${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 
-USE_PKGLOCALEDIR=	yes
-USE_LANGUAGES=		# none
+TEST_ENV+=	PYTHONPATH=${WRKSRC}/build/lib
+
+# as of 0.9.6
+# 1 skipped, 2 warnings, 1 error
+do-test:
+	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
 
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index