4518bdb13ea9ae0af7b9457d4264345590130ed2,setup.py,,,#,8

Before Change


]


try:
    import PyQt5  // NOQA
    PYQT_VERSION = 5
except ImportError:
    try:
        import PyQt4  // NOQA
        PYQT_VERSION = 4
    except ImportError:
        if PY2:
            sys.stderr.write(
                "Please install PyQt4 or PyQt5 for Python2.\n"
                "Note that PyQt5 can be installed via pip for Python3.")
            sys.exit(1)
        assert PY3
        // PyQt5 can be installed via pip for Python3
        install_requires.append("pyqt5")
        PYQT_VERSION = 5


if sys.argv[1] == "release":
    commands = [
        "git tag v{:s}".format(version),
        "git push origin master --tag",

After Change


// and PyQt5 is automatically installed on Python3.
QT_BINDING = None

try:
    import PyQt5  // NOQA
    QT_BINDING = "pyqt5"
except ImportError:
    pass

if QT_BINDING is None:
    try:
        import PySide2  // NOQA
        QT_BINDING = "pyside2"
    except ImportError:
        pass

if QT_BINDING is None:
    try:
        import PyQt4  // NOQA
        QT_BINDING = "pyqt4"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: wkentaro/labelme
Commit Name: 4518bdb13ea9ae0af7b9457d4264345590130ed2
Time: 2018-04-14
Author: www.kentaro.wada@gmail.com
File Name: setup.py
Class Name:
Method Name:


Project Name: NifTK/NiftyNet
Commit Name: 580d9291b010706e1625bcab93e33b8410515f97
Time: 2017-11-22
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_reader.py
Class Name: ImageReader
Method Name: layer_op


Project Name: tensorpack/tensorpack
Commit Name: 07e28eea3cb0e3d9f1eec7aeee0f2f0630411d57
Time: 2020-07-15
Author: ppwwyyxxc@gmail.com
File Name: tensorpack/utils/gpu.py
Class Name:
Method Name: get_num_gpu