Re: [openstack-dev] [Openstack] [all][infra][requirements] Odd cases in requirements?

2016-11-09 Thread John Villalovos
Ah, thanks a lot for that info :) I think that is what I need.

On Wed, Nov 9, 2016 at 7:36 AM, Jeremy Stanley  wrote:

> On 2016-11-09 07:19:04 -0800 (-0800), John Villalovos wrote:
> > Sort of related, what is the plan for supporting requirements which are
> > Python 3 only packages?
> >
> > In particular the package: mypy-lang
> > https://pypi.python.org/pypi/mypy-lang
> [...]
>
> If you only want mypy-lang installed when the interpreter is Python
> 3.3 or later (what their trove classifiers seem to imply for
> supported versions), use the following environment marker syntax:
>
> mypy-lang;python_version>='3.3'
>
> (see dnspython3 in global-requirements.txt for a similar example)
>
> https://pip.pypa.io/en/stable/reference/pip_install/#
> requirement-specifiers
> https://www.python.org/dev/peps/pep-0426/#environment-markers
> --
> Jeremy Stanley
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Openstack] [all][infra][requirements] Odd cases in requirements?

2016-11-09 Thread Jeremy Stanley
On 2016-11-09 07:19:04 -0800 (-0800), John Villalovos wrote:
> Sort of related, what is the plan for supporting requirements which are
> Python 3 only packages?
> 
> In particular the package: mypy-lang
> https://pypi.python.org/pypi/mypy-lang
[...]

If you only want mypy-lang installed when the interpreter is Python
3.3 or later (what their trove classifiers seem to imply for
supported versions), use the following environment marker syntax:

mypy-lang;python_version>='3.3'

(see dnspython3 in global-requirements.txt for a similar example)

https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers
https://www.python.org/dev/peps/pep-0426/#environment-markers
-- 
Jeremy Stanley

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Openstack] [all][infra][requirements] Odd cases in requirements?

2016-11-09 Thread John Villalovos
Sort of related, what is the plan for supporting requirements which are
Python 3 only packages?

In particular the package: mypy-lang
https://pypi.python.org/pypi/mypy-lang

I was considering adding some type hints to the ironic-lib project in the
future. But it needs to run the mypy program to do the type hint checking
and it is a Python 3 only program. Current workaround is to put it into
tox.ini.

Thanks,
John
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev