def update_libpath():
    bindir = os.path.dirname(os.path.abspath(sys.executable))
    libpathvname = _lpdict.get(sys.platform)
    if libpathvname:
        if sys.platform.startswith('win'):
            activate_base = 'activate.bat'
        else:
            activate_base = 'activate'

        if sys.platform.startswith('win'):
            template = \
"""REM begin libpath update
for /f "delims=" %%%%A in ('combine_paths %(libpathvname)s "%(newpath)s"') do @set PATH=%%%%A
REM end libpath update
"""
        else:
            template = \
"""# begin libpath update
%(libpathvname)s=$(combine_paths %(libpathvname)s "%(newpath)s")
export %(libpathvname)s
# end libpath update
"""

        newpath = get_env_libpath()
        template_dict = {
            'libpathvname': libpathvname,
            'newpath': newpath,
        }

        updated = []
        absbin = os.path.abspath(bindir)
        activate_fname = os.path.join(absbin, activate_base)
        with open(activate_fname, 'r') as inp:
            replacing = False
            for line in inp:
                if 'begin libpath update' in line:
                    replacing = True
                elif replacing:
                    if 'end libpath update' in line:
                        replacing = False
                else:
                    updated.append(line)

        with open(activate_fname, 'w') as out:
            for line in updated:
                out.write(line)

            out.write(template % template_dict)

        print """

The activate script has been updated with a new  %(libpathvname)s. The new
%(libpathvname)s will not take effect until you deactivate and reactivate your
virtual environment.

        """ % template_dict
Serializes a :class:`~prov.model.ProvDocument` instance to `PROV-XML
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/lib.py/update_libpath--crossover with--dataset/ETHPy150Open trungdong/prov/prov/serializers/provxml.py/ProvXMLSerializer.serialize