Only install monotonic on python2

monotonic is a backport of time.monotonic from python3. Only install it
for python2.

Depends-On: https://review.openstack.org/615441
Change-Id: Id27cd748e883d54dd93dac2e6bd8caee6728f7e1
This commit is contained in:
Monty Taylor 2018-06-11 13:12:22 -05:00
parent 304e2c9089
commit 658a29412b
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 7 additions and 2 deletions

View File

@ -21,7 +21,12 @@ import sys
import threading import threading
import traceback import traceback
from monotonic import monotonic as now # noqa try:
from monotonic import monotonic as now # noqa
except ImportError:
import time
now = time.monotonic
import six import six
try: try:

View File

@ -4,7 +4,7 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0
six>=1.10.0 # MIT six>=1.10.0 # MIT
monotonic>=0.6 # Apache-2.0 monotonic>=0.6;python_version<'3.3' # Apache-2.0
futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
contextlib2>=0.4.0;python_version<'3.0' # PSF License contextlib2>=0.4.0;python_version<'3.0' # PSF License
PrettyTable<0.8,>=0.7.1 # BSD PrettyTable<0.8,>=0.7.1 # BSD