Exemplo n.º 1
0
def parse_requirements(requirements_file):
    """
      Create a list for the 'install_requires' component of the setup function
      by parsing a requirements file
    """

    if os.path.exists(requirements_file):
        # return a list that contains each line of the requirements file
        return open(requirements_file, 'r').read().splitlines()
    else:
        print("ERROR: requirements file " + requirements_file + " not found.")
        sys.exit(1)


setup(
    name='wmcore',
    version=wmcore_version,
    maintainer='CMS DMWM Group',
    maintainer_email='*****@*****.**',
    package_dir={'': 'src/python/'},
    packages=list_packages([
        'src/python/Utils', 'src/python/WMCore', 'src/python/WMComponent',
        'src/python/WMQuality', 'src/python/PSetTweaks'
    ]),
    data_files=list_static_files(),
    install_requires=parse_requirements(requirements),
    url="https://github.com/dmwm/WMCore",
    license="Apache License, Version 2.0",
)
Exemplo n.º 2
0
        print('export PYTHONPATH=%s' % ':'.join(pypath))
        print('export PATH=%s' % ':'.join(expath))

        # We want the WMCORE root set, too
        print('export WMCORE_ROOT=%s' % get_path_to_wmcore_root())
        print('export WMCOREBASE=$WMCORE_ROOT')
        print('export WTBASE=$WMCORE_ROOT/src')

# The actual setup command, and the classes associated to the various options

# Need all the packages we want to build by default, this will be overridden in sub-system builds.
# Since it's a lot of code determine it by magic.
DEFAULT_PACKAGES = list_packages(['src/python/Utils',
                                  'src/python/WMCore',
                                  'src/python/WMComponent',
                                  'src/python/WMQuality',
                                  'src/python/PSetTweaks'])

# Divine out the version of WMCore from WMCore.__init__, which is bumped by
# "bin/buildrelease.sh"

# Obnoxiously, there's a dependency cycle when building packages. We'd like
# to simply get the current WMCore version by using
# from WMCore import __version__
# But PYTHONPATH isn't set until after the package is built, so we can't
# depend on the python module resolution behavior to load the version.
# Instead, we use the imp module to load the source file directly by
# filename.
wmcore_root = get_path_to_wmcore_root()
wmcore_package = imp.load_source('temp_module', os.path.join(wmcore_root,
Exemplo n.º 3
0
        print "export PYTHONPATH=%s" % ":".join(pypath)
        print "export PATH=%s" % ":".join(expath)

        # We want the WMCORE root set, too
        print "export WMCORE_ROOT=%s" % get_path_to_wmcore_root()
        print "export WMCOREBASE=$WMCORE_ROOT"
        print "export WTBASE=$WMCORE_ROOT/src"


# The actual setup command, and the classes associated to the various options

# Need all the packages we want to build by default, this will be overridden in sub-system builds.
# Since it's a lot of code determine it by magic.
default_packages = list_packages(
    ["src/python/Utils", "src/python/WMCore", "src/python/WMComponent", "src/python/WMQuality", "src/python/PSetTweaks"]
)

setup(
    name="wmcore",
    version="1.0",
    maintainer_email="*****@*****.**",
    cmdclass={
        "deep_clean": CleanCommand,
        "lint": LintCommand,
        "report": ReportCommand,
        "coverage": CoverageCommand,
        "test": TestCommand,
        "env": EnvCommand,
        "build_system": BuildCommand,
        "install_system": InstallCommand,
Exemplo n.º 4
0
        print('export PYTHONPATH=%s' % ':'.join(pypath))
        print('export PATH=%s' % ':'.join(expath))

        # We want the WMCORE root set, too
        print('export WMCORE_ROOT=%s' % get_path_to_wmcore_root())
        print('export WMCOREBASE=$WMCORE_ROOT')
        print('export WTBASE=$WMCORE_ROOT/src')


# The actual setup command, and the classes associated to the various options

# Need all the packages we want to build by default, this will be overridden in sub-system builds.
# Since it's a lot of code determine it by magic.
DEFAULT_PACKAGES = list_packages([
    'src/python/Utils', 'src/python/WMCore', 'src/python/WMComponent',
    'src/python/WMQuality', 'src/python/PSetTweaks'
])

# Divine out the version of WMCore from WMCore.__init__, which is bumped by
# "bin/buildrelease.sh"

# Obnoxiously, there's a dependency cycle when building packages. We'd like
# to simply get the current WMCore version by using
# from WMCore import __version__
# But PYTHONPATH isn't set until after the package is built, so we can't
# depend on the python module resolution behavior to load the version.
# Instead, we use the imp module to load the source file directly by
# filename.
wmcore_root = get_path_to_wmcore_root()
wmcore_package = imp.load_source(
    'temp_module',
Exemplo n.º 5
0
               expath.append(pth)

       print 'export PYTHONPATH=%s' % ':'.join(pypath)
       print 'export PATH=%s' % ':'.join(expath)

       #We want the WMCORE root set, too
       print 'export WMCORE_ROOT=%s' % get_path_to_wmcore_root()
       print 'export WMCOREBASE=$WMCORE_ROOT'
       print 'export WTBASE=$WMCORE_ROOT/src'

# The actual setup command, and the classes associated to the various options

# Need all the packages we want to build by default, this will be overridden in sub-system builds.
# Since it's a lot of code determine it by magic.
default_packages = list_packages(['src/python/WMCore',
                                  'src/python/WMComponent',
                                  'src/python/WMQuality',
                                  'src/python/PSetTweaks'])

setup (name = 'wmcore',
       version = '1.0',
       maintainer_email = '*****@*****.**',
       cmdclass = {'deep_clean': CleanCommand,
                   'lint': LintCommand,
                   'report': ReportCommand,
                   'coverage': CoverageCommand ,
                   'test' : TestCommand,
                   'env': EnvCommand,
                   'build_system': BuildCommand,
                   'install_system': InstallCommand },
       # base directory for all our packages
       package_dir = {'': 'src/python/'},# % get_path_to_wmcore_root()},