On Wed, Jan 17, 2018 at 12:25:46AM +0000, Stuart Henderson wrote:
> On 2018/01/17 01:06, Joerg Jung wrote:
> > On Wed, Jan 17, 2018 at 12:55:24AM +0100, Joerg Jung wrote:
> > > On Tue, Jan 16, 2018 at 11:40:57PM +0000, Stuart Henderson wrote:
> > > > On 2018/01/17 00:01, Joerg Jung wrote:
> > > > > Hi,
> > > > > 
> > > > > please find attached an update for devel/py-typing.
> > > > 
> > > > The update seems ok, but:
> > > > 
> > > > > This update introduces a python3 FLAVOR, which is needed as a 
> > > > > dependency
> > > > > for the upcoming homeassistant port.
> > > > 
> > > > typing is in Python core for 3.5+, so I think it might be better to
> > > > skip the py3 flavour.
> > > 
> > > From PEP 484: Type Hints: 
> > > 
> > > "The module is available in Python since version 3.5.0 on a provisional 
> > > basis until Python 3.7.0." 
> > > [...]
> > > "The changes are merged in three branches (3.5, 3.6, default) due to
> > > the module's provisional status."
> > > 
> > > From what I understand, provisional basis means this module is the newer
> > > upstream-branch compared to the python built-in and it looks like 
> > > homeassistant really wants this newer one.
> > > 
> > > But I'm not sure about this assumption :(
> > 
> > My assumption was right, looks like the built-in is not enough, see
> > trace below.
> > 
> > However, it can be really removed from RUN_DEPENDS of py3-aiohttp-cors
> > port. Thanks for the pointer.
> > 
> > 
> > $ python3.6                                                                 
> >                  
> > Python 3.6.4 (default, Jan  5 2018, 14:05:05) 
> > [GCC 4.2.1 Compatible OpenBSD Clang 5.0.1 (tags/RELEASE_501/final)] on 
> > openbsd6
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import typing
> > >>> typing.__all__
> > ['Any', 'Callable', 'ClassVar', 'Generic', 'Optional', 'Tuple', 'Type', 
> > 'TypeVar', 'Union', 'AbstractSet', 'GenericMeta', 'ByteString', 
> > 'Container', 'ContextManager', 'Hashable', 'ItemsView', 'Iterable', 
> > 'Iterator', 'KeysView', 'Mapping', 'MappingView', 'MutableMapping', 
> > 'MutableSequence', 'MutableSet', 'Sequence', 'Sized', 'ValuesView', 
> > 'Reversible', 'SupportsAbs', 'SupportsBytes', 'SupportsComplex', 
> > 'SupportsFloat', 'SupportsInt', 'SupportsRound', 'Counter', 'Deque', 
> > 'Dict', 'DefaultDict', 'List', 'Set', 'FrozenSet', 'NamedTuple', 
> > 'Generator', 'AnyStr', 'cast', 'get_type_hints', 'NewType', 
> > 'no_type_check', 'no_type_check_decorator', 'overload', 'Text', 
> > 'TYPE_CHECKING', 'Awaitable', 'Coroutine', 'AsyncIterable', 
> > 'AsyncIterator', 'Collection', 'AsyncContextManager', 'ChainMap', 
> > 'AsyncGenerator']
> > >>> <ctrl>+<d>
> > $ hass --verbose --debug 
> > Traceback (most recent call last):
> >   File "/usr/local/bin/hass", line 6, in <module>
> >     from pkg_resources import load_entry_point
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 2994, in <module>
> >     @_call_aside
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 2980, in _call_aside
> >     f(*args, **kwargs)
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 3007, in _initialize_master_working_set
> >     working_set = WorkingSet._build_master()
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 658, in _build_master
> >     ws.require(__requires__)
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 966, in require
> >     needed = self.resolve(parse_requirements(requirements))
> >   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> > line 852, in resolve
> >     raise DistributionNotFound(req, requirers)
> > pkg_resources.DistributionNotFound: The 'typing<4,>=3' distribution was not 
> > found and is required by homeassistant 
> > 
> 
> As it's in Python core rather than a package, requirements doesn't
> know about it. I think it's very likely to work ok if you kill it from
> requirements.txt.

Yes, dependency can be dropped from homeassistant. I'll send an update
for this.  New diff attached, now no longer with python3 flavor and no 
longer needed as dependency for homeassistant.

OK?

  
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-typing/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    5 Mar 2017 18:16:50 -0000       1.2
+++ Makefile    17 Jan 2018 19:48:28 -0000
@@ -2,9 +2,9 @@
 
 COMMENT =              type hints for python
 
-MODPY_EGG_VERSION =    3.5.3.0
+MODPY_EGG_VERSION =    3.6.2
 DISTNAME =             typing-${MODPY_EGG_VERSION}
-PKGNAME =              py-typing-${MODPY_EGG_VERSION}
+PKGNAME =              py-${DISTNAME}
 
 CATEGORIES =           devel
 
@@ -13,6 +13,7 @@ PERMIT_PACKAGE_CDROM =        Yes
 
 MODULES =              lang/python
 MODPY_PI =             Yes
+MODPY_SETUPTOOLS =     Yes
 
 do-test:
        cd ${WRKSRC} && ${MODPY_BIN} -m unittest discover python2
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/py-typing/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    5 Mar 2017 18:16:50 -0000       1.2
+++ distinfo    17 Jan 2018 19:48:28 -0000
@@ -1,2 +1,2 @@
-SHA256 (typing-3.5.3.0.tar.gz) = yi2qx+OT6O6G6RQM0M8Bcv9rtQ698LBigXcPmPMb/yE=
-SIZE (typing-3.5.3.0.tar.gz) = 60350
+SHA256 (typing-3.6.2.tar.gz) = 1RS9hLKE3T6ETwMFrAdRHwl+MlFx9sxKIIeNEa13GEk=
+SIZE (typing-3.6.2.tar.gz) = 78726
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/py-typing/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   23 Aug 2016 12:53:23 -0000      1.1.1.1
+++ pkg/PLIST   17 Jan 2018 19:48:28 -0000
@@ -1,4 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2016/08/23 12:53:23 ajacoutot Exp $
-lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
+lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
+lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
+lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
+lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
+lib/python${MODPY_VERSION}/site-packages/typing-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
 lib/python${MODPY_VERSION}/site-packages/typing.py
 lib/python${MODPY_VERSION}/site-packages/typing.pyc

Reply via email to