pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/py-cookiecutter py-cookiecutter: fix



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e0ed68a1b168
branches:  trunk
changeset: 416246:e0ed68a1b168
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Oct 21 22:54:23 2019 +0000

description:
py-cookiecutter: fix

- switch to PYPI
- enable testing
- get rid of sphinx (building docs does not work)
- use alternatives

diffstat:

 devel/py-cookiecutter/Makefile                    |  69 +++++++++-------------
 devel/py-cookiecutter/PLIST                       |   5 +-
 devel/py-cookiecutter/distinfo                    |  11 +--
 devel/py-cookiecutter/patches/patch-docs_Makefile |  19 ------
 4 files changed, 36 insertions(+), 68 deletions(-)

diffs (138 lines):

diff -r 4b4f5dcbe537 -r e0ed68a1b168 devel/py-cookiecutter/Makefile
--- a/devel/py-cookiecutter/Makefile    Mon Oct 21 22:15:10 2019 +0000
+++ b/devel/py-cookiecutter/Makefile    Mon Oct 21 22:54:23 2019 +0000
@@ -1,50 +1,39 @@
-# $NetBSD: Makefile,v 1.4 2018/02/25 01:15:03 minskim Exp $
-
-DISTNAME=                      cookiecutter-1.6.0
-GITHUB_PROJECT=                        cookiecutter
-PKGNAME=                       ${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES=                    devel
-MASTER_SITES=                  ${MASTER_SITE_GITHUB:=audreyr/}
+# $NetBSD: Makefile,v 1.5 2019/10/21 22:54:23 adam Exp $
 
-MAINTAINER=                    gde%llew.me@localhost
-HOMEPAGE=                      https://github.com/audreyr/cookiecutter/
-COMMENT=                       Command-line utility that creates projects from project templates
-LICENSE=                       modified-bsd
+DISTNAME=      cookiecutter-1.6.0
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
+CATEGORIES=    devel python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=c/cookiecutter/}
+# XXX: remove on next update
+DIST_SUBDIR=   cookiecutter
 
-USE_LANGUAGES=                 # none
-USE_TOOLS+=                    make:build
-AUTO_MKDIRS=                   yes
-INSTALLATION_DIRS+=            ${PKGMANDIR}/man1/
+MAINTAINER=    gde%llew.me@localhost
+HOMEPAGE=      https://github.com/audreyr/cookiecutter
+COMMENT=       Command-line utility that creates projects from project templates
+LICENSE=       modified-bsd
 
-BUILD_DEPENDS+=                        ${PYPKGPREFIX}-sphinx>=1.2.3nb1:../../textproc/py-sphinx
-BUILD_DEPENDS+=                        ${PYPKGPREFIX}-chardet>=2.3.0:../../converters/py-chardet
-BUILD_DEPENDS+=                        ${PYPKGPREFIX}-test>=2.3.0:../../devel/py-test
-DEPENDS+=                      ${PYPKGPREFIX}-future>=0.15.2:../../devel/py-future
-DEPENDS+=                      ${PYPKGPREFIX}-binaryornot>=0.2.0:../../devel/py-binaryornot
-DEPENDS+=                      ${PYPKGPREFIX}-jinja2>=2.7:../../textproc/py-jinja2
-DEPENDS+=                      ${PYPKGPREFIX}-jinja2-time>=0.1:../../time/py-jinja2-time
-DEPENDS+=                      ${PYPKGPREFIX}-click>=6.3:../../devel/py-click
-DEPENDS+=                      ${PYPKGPREFIX}-whichcraft>=0.4.0:../../devel/py-whichcraft
-DEPENDS+=                      ${PYPKGPREFIX}-poyo>=0.1.0:../../textproc/py-poyo
-DEPENDS+=                      ${PYPKGPREFIX}-requests>=2.18.0:../../devel/py-requests
+DEPENDS+=      ${PYPKGPREFIX}-binaryornot>=0.2.0:../../devel/py-binaryornot
+DEPENDS+=      ${PYPKGPREFIX}-click>=6.3:../../devel/py-click
+DEPENDS+=      ${PYPKGPREFIX}-future>=0.15.2:../../devel/py-future
+DEPENDS+=      ${PYPKGPREFIX}-jinja2>=2.7:../../textproc/py-jinja2
+DEPENDS+=      ${PYPKGPREFIX}-jinja2-time>=0.1.0:../../time/py-jinja2-time
+DEPENDS+=      ${PYPKGPREFIX}-poyo>=0.1.0:../../textproc/py-poyo
+DEPENDS+=      ${PYPKGPREFIX}-requests>=2.18.0:../../devel/py-requests
+DEPENDS+=      ${PYPKGPREFIX}-whichcraft>=0.4.0:../../devel/py-whichcraft
+TEST_DEPENDS+= ${PYPKGPREFIX}-freezegun-[0-9]*:../../devel/py-freezegun
+TEST_DEPENDS+= ${PYPKGPREFIX}-test>=2.3.0:../../devel/py-test
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-mock-[0-9]*:../../devel/py-test-mock
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-runner-[0-9]*:../../devel/py-test-runner
 
-# for python < 3.0
-.include "../../lang/python/pyversion.mk"
-.if ${_PYTHON_VERSION} < 30
-DEPENDS+=                      ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
-.endif
+USE_LANGUAGES= # none
 
-REPLACE_PYTHON+=               setup.py
-REPLACE_PYTHON+=               cookiecutter/*.py
-
-WRKSRC=                                ${WRKDIR}/${DISTNAME}
-
-post-build:
-       cd ${WRKSRC}/docs/ && make SPHINXBUILD=${PREFIX}/bin/sphinx-build${PYVERSSUFFIX} man
+PYSETUPTESTTARGET=     pytest
 
 post-install:
-       ${INSTALL_MAN} ${WRKSRC}/docs/_build/man/cookiecutter.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
+       cd ${DESTDIR}${PREFIX}/bin && \
+       ${MV} cookiecutter cookiecutter-${PYVERSSUFFIX} || ${TRUE}
 
-.include "../../lang/python/application.mk"
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 4b4f5dcbe537 -r e0ed68a1b168 devel/py-cookiecutter/PLIST
--- a/devel/py-cookiecutter/PLIST       Mon Oct 21 22:15:10 2019 +0000
+++ b/devel/py-cookiecutter/PLIST       Mon Oct 21 22:54:23 2019 +0000
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.2 2018/02/25 01:15:03 minskim Exp $
-bin/cookiecutter
+@comment $NetBSD: PLIST,v 1.3 2019/10/21 22:54:23 adam Exp $
+bin/cookiecutter-${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -61,4 +61,3 @@
 ${PYSITELIB}/cookiecutter/zipfile.py
 ${PYSITELIB}/cookiecutter/zipfile.pyc
 ${PYSITELIB}/cookiecutter/zipfile.pyo
-man/man1/cookiecutter.1
diff -r 4b4f5dcbe537 -r e0ed68a1b168 devel/py-cookiecutter/distinfo
--- a/devel/py-cookiecutter/distinfo    Mon Oct 21 22:15:10 2019 +0000
+++ b/devel/py-cookiecutter/distinfo    Mon Oct 21 22:54:23 2019 +0000
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.2 2018/02/25 01:15:03 minskim Exp $
+$NetBSD: distinfo,v 1.3 2019/10/21 22:54:23 adam Exp $
 
-SHA1 (cookiecutter-1.6.0.tar.gz) = d4d2bfe2d7cc3d31e9ae9f81158ae9812b1fbf9f
-RMD160 (cookiecutter-1.6.0.tar.gz) = 371e4c4a53cbdd9cdfd043066e38e6538a634e9e
-SHA512 (cookiecutter-1.6.0.tar.gz) = 0a06ae8fe7aceeeb0bcb98b5981d743b2e2e5d5f121c2e0703bb76399b0433816beaddb64c92f28d50f1781737db25907a10ec7b59f6c02c17171cfb56fb12f4
-Size (cookiecutter-1.6.0.tar.gz) = 255579 bytes
-SHA1 (patch-docs_Makefile) = c0451b26ea79a8ebd7ca0f733264806fea84857d
+SHA1 (cookiecutter/cookiecutter-1.6.0.tar.gz) = 412294054293eadc1c5ebaefc307db3525b48954
+RMD160 (cookiecutter/cookiecutter-1.6.0.tar.gz) = f6c6858bdd75cebd575badab9c4c044f4bd9769f
+SHA512 (cookiecutter/cookiecutter-1.6.0.tar.gz) = 347b0f45fd0bcaaa1a8d7f04bf010d8cf526e816d9a772653dc81fbda3871cff02113ed4781f8897877724321a7d612c9ba26462f148a3ace93ec1acf15e0efe
+Size (cookiecutter/cookiecutter-1.6.0.tar.gz) = 181753 bytes
diff -r 4b4f5dcbe537 -r e0ed68a1b168 devel/py-cookiecutter/patches/patch-docs_Makefile
--- a/devel/py-cookiecutter/patches/patch-docs_Makefile Mon Oct 21 22:15:10 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-docs_Makefile,v 1.1 2016/05/16 15:05:48 nils Exp $
-
-removed non-working check for sphinx
-
---- docs/Makefile.orig 2015-03-16 12:49:03.000000000 +0000
-+++ docs/Makefile
-@@ -8,9 +8,9 @@ PAPER         =
- BUILDDIR      = _build
- 
- # User-friendly check for sphinx-build
--ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
--$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. 
Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
--endif
-+#ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-+#$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. 
Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-+#endif
- 
- # Internal variables.
- PAPEROPT_a4     = -D latex_paper_size=a4



Home | Main Index | Thread Index | Old Index