e9527915f88c9495017543a344766189d7412c51,versioneer.py,,versions_from_parentdir,#Any#Any#Any#,430

Before Change




def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False):
    if IN_LONG_VERSION_PY:
        // We"re running from _version.py. If it"s from a source tree
        // (execute-in-place), we can work upwards to find the root of the
        // tree, and then check the parent directory for a version string. If
        // it"s in an installed application, there"s no hope.
        try:
            here = os.path.realpath(__file__)
        except NameError:
            // py2exe/bbfreeze/non-CPython don"t have __file__
            return {} // without __file__, we have no hope
        // versionfile_source is the relative path from the top of the source
        // tree to _version.py. Invert this to find the root from __file__.
        root = here
        for i in range(len(versionfile_source.split("/"))):
            root = os.path.dirname(root)
    else:
        // we"re running from versioneer.py, which means we"re running from
        // the setup.py in a source tree. sys.argv[0] is setup.py in the root.
        here = os.path.realpath(sys.argv[0])
        root = os.path.dirname(here)

    // Source tarballs conventionally unpack into a directory that includes
    // both the project name and a version string.
    dirname = os.path.basename(root)
    if not dirname.startswith(parentdir_prefix):
        if verbose:
            print("guessing rootdir is "%s", but "%s" doesn"t start with prefix "%s"" %

After Change


the top level of your source tree, next to `setup.py` and the `setup.cfg`
that configures it. This overrides several distutils/setuptools commands to
compute the version when invoked, and changes `setup.py build` and `setup.py
sdist` to replace `_version.py` with a small static file that contains just
the generated version data.

//// Installation
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: bokeh/bokeh
Commit Name: e9527915f88c9495017543a344766189d7412c51
Time: 2017-01-11
Author: azpujps@gmail.com
File Name: versioneer.py
Class Name:
Method Name: versions_from_parentdir


Project Name: pyannote/pyannote-audio
Commit Name: abbfdc5b04ec1824e42cebb472626d234ff7bd36
Time: 2017-01-09
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: tune


Project Name: pyannote/pyannote-audio
Commit Name: abbfdc5b04ec1824e42cebb472626d234ff7bd36
Time: 2017-01-09
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: test