mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1189847 - [mozversion] mozversion requires mozdevice, it shoudn't. r=dhunt
This make the mozdevice dependency of mozversion optional.
This commit is contained in:
parent
474a77cd7a
commit
b85b91d522
@ -6,6 +6,15 @@ provides version information such as the application name and the changesets
|
||||
that it has been built from. This is commonly used in reporting or for
|
||||
conditional logic based on the application under test.
|
||||
|
||||
Note that mozversion can report the version of remote devices (e.g. Firefox OS)
|
||||
but it requires the :mod:`mozdevice` dependency in that case. You can require it
|
||||
along with mozversion by using the extra *device* dependency:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install mozversion[device]
|
||||
|
||||
|
||||
API Usage
|
||||
---------
|
||||
|
||||
|
@ -12,7 +12,6 @@ import tempfile
|
||||
import xml.dom.minidom
|
||||
import zipfile
|
||||
|
||||
import mozdevice
|
||||
import mozfile
|
||||
import mozlog
|
||||
|
||||
@ -189,6 +188,13 @@ class RemoteB2GVersion(B2GVersion):
|
||||
**kwargs):
|
||||
B2GVersion.__init__(self, sources, **kwargs)
|
||||
|
||||
try:
|
||||
import mozdevice
|
||||
except ImportError:
|
||||
self._logger.critical("mozdevice is required to get the version"
|
||||
" of a remote device")
|
||||
raise
|
||||
|
||||
if dm_type == 'adb':
|
||||
dm = mozdevice.DeviceManagerADB(deviceSerial=device_serial,
|
||||
serverHost=adb_host,
|
||||
|
@ -6,9 +6,6 @@ from setuptools import setup
|
||||
|
||||
PACKAGE_VERSION = '1.3'
|
||||
|
||||
dependencies = ['mozdevice >= 0.44',
|
||||
'mozfile >= 1.0',
|
||||
'mozlog >= 3.0']
|
||||
|
||||
setup(name='mozversion',
|
||||
version=PACKAGE_VERSION,
|
||||
@ -23,7 +20,8 @@ setup(name='mozversion',
|
||||
packages=['mozversion'],
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
install_requires=dependencies,
|
||||
install_requires=['mozfile >= 1.0', 'mozlog >= 3.0'],
|
||||
extras_require={'device': ['mozdevice >= 0.44']},
|
||||
entry_points="""
|
||||
# -*- Entry points: -*-
|
||||
[console_scripts]
|
||||
|
Loading…
Reference in New Issue
Block a user