Hi,

My bad, bcallah@ pointed out that it's not building with python 2.7, seems I 
only tested with python3 flavor.

The post-install running sphinx fails, the get_distribution('Flask-WTF')  for 
setuptools works well
with the python3 flavor, but fails with a DistributionNotFound error with 
python 2.7.
The current version doesn't use get_distribution there, but just had the 
version and release
hardcoded, so I took the same approach.

If someone has a cluebat why the get_distribution() call fails with python2.7, 
I'd be all ears,
otherwise, this seems to do the trick.


On Tuesday, October 17, 2017 23:40 CEST, "Sebastian Reitenbach" 
<sebas...@l00-bugdead-prods.de> wrote:

> here is an update required for updating www/puppetboard, as far as I can see, 
> it's not used by anything else, and seems to work with the updated 
> puppetboard.
>
> comments, OK?
>
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/py-flask-wtf/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile    3 Jan 2017 19:28:48 -0000       1.10
+++ Makefile    19 Oct 2017 08:34:55 -0000
@@ -2,10 +2,9 @@

 COMMENT=       simple integration of Flask and WTForms

-MODPY_EGG_VERSION=0.9.4
+MODPY_EGG_VERSION=0.14.2
 DISTNAME=      Flask-WTF-${MODPY_EGG_VERSION}
 PKGNAME=       py-${DISTNAME:L}
-REVISION=      5
 CATEGORIES=    www

 # BSD
@@ -27,6 +26,11 @@
 TEST_DEPENDS=          devel/py-nose

 USE_GMAKE=             Yes
+
+MAIN_VERSION =         ${MODPY_EGG_VERSION:C/.[0-9]$//}
+SUBST_VARS +=          MAIN_VERSION
+pre-build:
+       ${SUBST_CMD} ${WRKSRC}/docs/conf.py

 post-build:
        @cd ${WRKSRC}/docs && \
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/py-flask-wtf/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo    27 Dec 2013 09:24:04 -0000      1.1.1.1
+++ distinfo    19 Oct 2017 08:34:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (Flask-WTF-0.9.4.tar.gz) = RqGOEabiEvESCo9AcrgUyDPoLzaa8kEbG0Kok5ns6/k=
-SIZE (Flask-WTF-0.9.4.tar.gz) = 245677
+SHA256 (Flask-WTF-0.14.2.tar.gz) = XRTVXP019hPZnufLoPw/u+Y7oC9UTTSRWMFMoVVhzDY=
+SIZE (Flask-WTF-0.14.2.tar.gz) = 254903
Index: patches/patch-docs_conf_py
===================================================================
RCS file: patches/patch-docs_conf_py
diff -N patches/patch-docs_conf_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-docs_conf_py  19 Oct 2017 08:34:55 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+For python 2.7, the get_distribution fails with:
+raise DistributionNotFound(req, requirers)
+DistributionNotFound: The 'Flask-WTF' distribution was not found and is
+required by the application
+
+hardcode the version and release as prior versions of flask-wtf did.
+
+Index: docs/conf.py
+--- docs/conf.py.orig
++++ docs/conf.py
+@@ -49,11 +49,11 @@ author = 'Dan Jacob'
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
+ # built documents.
+-dist = get_distribution('Flask-WTF')
++#dist = get_distribution('Flask-WTF')
+ # The short X.Y version.
+-version = '.'.join(dist.version.split('.', 2)[:2])
++version = '${MAIN_VERSION}'
+ # The full version, including alpha/beta/rc tags.
+-release = dist.version
++release = '${MODPY_EGG_VERSION}'
+
+ # The language for content autogenerated by Sphinx. Refer to documentation
+ # for a list of supported languages.
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- patches/patch-setup_py      27 Dec 2013 09:24:04 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-setup_py,v 1.1.1.1 2013/12/27 09:24:04 jasper Exp $
---- setup.py.orig      Fri Dec 27 10:22:02 2013
-+++ setup.py   Fri Dec 27 10:22:08 2013
-@@ -51,7 +51,6 @@ setup(
-     ],
-     tests_require=[
-         'nose',
--        'Flask-Babel',
-     ],
-     classifiers=[
-         'Development Status :: 4 - Beta',
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/py-flask-wtf/pkg/PLIST,v
retrieving revision 1.4
diff -u -r1.4 PLIST
--- pkg/PLIST   31 May 2016 13:43:15 -0000      1.4
+++ pkg/PLIST   19 Oct 2017 08:34:55 -0000
@@ -72,12 +72,10 @@
 share/doc/${MODPY_PY_PREFIX}flask-wtf/config.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/csrf.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/form.html
-share/doc/${MODPY_PY_PREFIX}flask-wtf/genindex.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/index.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/install.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/license.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/objects.inv
-share/doc/${MODPY_PY_PREFIX}flask-wtf/py-modindex.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/quickstart.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/search.html
 share/doc/${MODPY_PY_PREFIX}flask-wtf/searchindex.js

Reply via email to