Пример #1
0
# @author  Michael Behrisch
# @author  Jakob Erdmann
# @date    2011

from __future__ import absolute_import
import optparse
import subprocess
import zipfile
import os
import tempfile
import glob
import shutil

import version

SUMO_VERSION = version.get_pep440_version().replace("post", "")
INPUT_DEFAULT = r"S:\daily\sumo-win64-git.zip"
OUTPUT_DEFAULT = "sumo.msi"
WIX_DEFAULT = "%sbin" % os.environ.get(
    "WIX", r"D:\Programme\Windows Installer XML v3.5\\")
WXS_DEFAULT = os.path.join(
    os.path.dirname(__file__), "..", "..", "build", "wix", "*.wxs")
LICENSE = os.path.join(
    os.path.dirname(__file__), "..", "..", "build", "wix", "License.rtf")

SKIP_FILES = ["osmWebWizard.py", "sumo-gui.exe",
              "netedit.exe", "start-command-line.bat"]


def buildFragment(wixBin, sourceDir, targetLabel, tmpDir, log=None):
    base = os.path.basename(sourceDir)
Пример #2
0
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

# @file    pom.py
# @author  Michael Behrisch
# @date    2021-01-15
"""
Generates pom files to build libsumo and libtraci jars
"""
from __future__ import absolute_import
from __future__ import print_function
import sys
import os

import version

v = version.get_pep440_version()
if ".post" in v:
    v = v[:v.index(".post")] + "-SNAPSHOT"
root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))

with open("pom.xml", "w") as pom:
    pom.write("""<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.eclipse.sumo</groupId>
    <artifactId>%s</artifactId>
    <version>%s</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Пример #3
0
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

# @file    setup-libsumo.py
# @author  Benjamin Striner
# @author  Michael Behrisch
# @date    2017-01-26

from setuptools import setup
from setuptools.dist import Distribution
from setuptools.command.install import install
import os
import glob

import version

SUMO_VERSION = version.get_pep440_version()
package_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
data_files = []
for f in sorted(
        glob.glob(os.path.join(os.path.dirname(package_dir), 'bin', '*.dll'))):
    f = f.lower()
    if not f.endswith("d.dll") or f[:-5] + ".dll" not in data_files:
        data_files.append(f)


class InstallPlatlib(install):
    def finalize_options(self):
        install.finalize_options(self)
        if self.distribution.has_ext_modules():
            self.install_lib = self.install_platlib
Пример #4
0
# 1.9.0-SNAPSHOT (according to SUMO versioning)
# corresponds 1.10.0-SNAPSHOT in the MAVEN world.
#
# In #7921 we decide to make things simple by just
# adding 1 to the minor part of the SUMO version to
# move it to the MAVEN world.
# (Except when we are precisely at a release / tagged commit,
#  then we do not add the 1, because versions are exactly
#  the same in both worlds here.)
#
#   - SUMO: 1.9.0           --> MAVEN: 1.9.0  (release)
#   - SUMO: 1.9.1           --> MAVEN: 1.9.1  (release)
#   - SUMO: 1.9.0.post18    --> MAVEN: 1.10.0-SNAPSHOT
#   - SUMO: 1.9.1.post23    --> MAVEN: 1.10.0-SNAPSHOT

v = version.get_pep440_version()  # v = '1.9.0.post180'

# Are we past a release?
# (If there is no ".post", we are exactly at a release, so we dont touch it)
if ".post" in v:
    # example: '1.9.0.post10' -> '1', '9', '0.post10'
    major, minor, _ = v.split(".", 2)
    # Want v = '1.10.0-SNAPSHOT',
    # but need to make sure, minor releases like
    # 1.9.1-SNAPSHOT work ok too!
    # --> we just override the patch-level version with 0
    v = '%s.%s.0-SNAPSHOT' % (major, int(minor) + 1)

root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))

with open("pom.xml", "w") as pom: