예제 #1
0
def repositoryUpdate(options, repoLogFile):
    if options.no_update:
        return ""
    with open(repoLogFile, 'w') as log:
        cwd = os.getcwd()
        os.chdir(os.path.join(options.rootDir, "git"))
        subprocess.call(["git", "pull"], stdout=log, stderr=subprocess.STDOUT)
        gitrev = version.gitDescribe()
        os.chdir(cwd)
    return gitrev
예제 #2
0
def repositoryUpdate(options, repoLogFile):
    if not options.update:
        return ""
    with open(repoLogFile, 'w') as log:
        cwd = os.getcwd()
        os.chdir(os.path.join(options.rootDir, "git"))
        subprocess.call(["git", "pull"], stdout=log, stderr=subprocess.STDOUT)
        gitrev = version.gitDescribe()
        os.chdir(cwd)
    return gitrev
예제 #3
0
def repositoryUpdate(options, log):
    gitrev = ""
    cwd = os.getcwd()
    for d in options.repositories.split(","):
        os.chdir(os.path.join(options.rootDir, d))
        subprocess.call(["git", "pull"], stdout=log, stderr=subprocess.STDOUT)
        subprocess.call(["git", "submodule", "update"], stdout=log, stderr=subprocess.STDOUT)
        if gitrev == "":
            gitrev = version.gitDescribe()
    os.chdir(cwd)
    return gitrev
예제 #4
0
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

# @file    setup-traci.py
# @author  Dominik Buse
# @author  Michael Behrisch
# @date    2017-01-26

from setuptools import setup
import os
import version

SUMO_VERSION = version.gitDescribe(commitPrefix=".",
                                   padZero=False)[1:-11].replace("_", ".")
package_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

setup(
    name='traci',
    version=SUMO_VERSION,
    url='https://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python',
    author='DLR and contributors',
    author_email='*****@*****.**',
    license='EPL-2.0',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'LICENSE :: OSI Approved :: Eclipse Public License v2 (EPL-2.0)',
        'Programming Language :: Python :: 2',
예제 #5
0
                     help="last revision to build")
options, args = optParser.parse_args()

LOCK = "../history.lock"
if os.path.exists(LOCK):
    sys.exit("History building is still locked!")
open(LOCK, 'w').close()
try:
    subprocess.call(["git", "checkout", "-q", "master"])
    subprocess.call(["git", "pull"])
    commits = {}
    for line in subprocess.check_output(
        ["git", "log", "%s..%s" % (options.begin, options.end)]).splitlines():
        if line.startswith("commit "):
            h = line.split()[1]
            commits[h] = version.gitDescribe(h)
    for h, desc in sorted(commits.items(), key=lambda x: x[1]):
        if not os.path.exists('../bin%s' % desc):
            ret = subprocess.call(["git", "checkout", "-q", h])
            if ret != 0:
                continue
            subprocess.call('make clean; make -j 16', shell=True)
            shutil.copytree('bin',
                            '../bin%s' % desc,
                            ignore=shutil.ignore_patterns(
                                'Makefile*', '*.bat', '*.jar'))
            subprocess.call('strip -R .note.gnu.build-id ../bin%s/*' % desc,
                            shell=True)
            subprocess.call("sed -i 's/%s/%s/' ../bin%s/*" %
                            (desc, len(desc) * "0", desc),
                            shell=True)
예제 #6
0
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

# @file    setup-traci.py
# @author  Dominik Buse
# @author  Michael Behrisch
# @date    2017-01-26
# @version $Id$

from setuptools import setup
import os
import version

SUMO_VERSION = version.gitDescribe()[1:-11].replace("_", ".").replace("+", ".")
package_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

setup(
    name='traci',
    version=SUMO_VERSION,
    url='http://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python',
    author='DLR and contributors',
    author_email='*****@*****.**',
    license='EPL-2.0',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'LICENSE :: OSI Approved :: Eclipse Public License v2 (EPL-2.0)',
        'Programming Language :: Python :: 2',
예제 #7
0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

# @file    setup-traci.py
# @author  Dominik Buse
# @author  Michael Behrisch
# @date    2017-01-26
# @version $Id$


from setuptools import setup
import os
import version

SUMO_VERSION = version.gitDescribe()[1:-11].replace("_", ".").replace("+", ".")
package_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

setup(
    name='traci',
    version=SUMO_VERSION,
    url='https://sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python',
    author='DLR and contributors',
    author_email='*****@*****.**',
    license='EPL-2.0',

    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'Intended Audience :: Science/Research',
        'LICENSE :: OSI Approved :: Eclipse Public License v2 (EPL-2.0)',
예제 #8
0
파일: history.py 프로젝트: behrisch/sumo
optParser.add_option("-b", "--begin", default="1e86430b48", help="first revision to build")
optParser.add_option("-e", "--end", default="HEAD", help="last revision to build")
options, args = optParser.parse_args()

LOCK = "../history.lock"
if os.path.exists(LOCK):
    sys.exit("History building is still locked!")
open(LOCK, 'w').close()
try:
    subprocess.call(["git", "checkout", "-q", "master"])
    subprocess.call(["git", "pull"])
    commits = {}
    for line in subprocess.check_output(["git", "log", "%s..%s" % (options.begin, options.end)]).splitlines():
        if line.startswith("commit "):
            h = line.split()[1]
            commits[h] = version.gitDescribe(h)
    haveBuild = False
    for h, desc in sorted(commits.items(), key=lambda x: x[1]):
        if not os.path.exists('../bin%s' % desc):
            ret = subprocess.call(["git", "checkout", "-q", h])
            if ret != 0:
                continue
            subprocess.call('make clean; make -j', shell=True)
            haveBuild = True
            shutil.copytree('bin', '../bin%s' % desc,
                            ignore=shutil.ignore_patterns('Makefile*', '*.bat', '*.jar'))
            subprocess.call('strip -R .note.gnu.build-id ../bin%s/*' % desc, shell=True)
            subprocess.call("sed -i 's/%s/%s/' ../bin%s/*" % (desc, len(desc) * "0", desc), shell=True)
    if haveBuild:
        for line in subprocess.check_output('fdupes -1 -q ../binv*', shell=True).splitlines():
            dups = line.split()