def get_wheel_dependencies():
    """Return a dictionary of ITK wheel dependencies.
    """
    all_depends = {}
    regex_group_depends = \
        r'set\s*\(\s*ITK\_GROUP\_([a-zA-Z0-9\_\-]+)\_DEPENDS\s*([a-zA-Z0-9\_\-\s]*)\s*'  # noqa: E501
    pattern = re.compile(regex_group_depends)
    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
    from itkVersion import get_versions
    version = get_versions()['package-version']
    with open(os.path.join(SCRIPT_DIR, "..", "CMakeLists.txt"), 'r') as file_:
        for line in file_.readlines():
            match = re.search(pattern, line)
            if not match:
                continue
            wheel = from_group_to_wheel(match.group(1))
            _wheel_depends = [
                from_group_to_wheel(group) + '==' + version
                for group in match.group(2).split()
                ]
            all_depends[wheel] = _wheel_depends
    all_depends['itk-meta'] = [
        wheel_name + '==' + version for wheel_name in get_wheel_names()
        if wheel_name != 'itk-meta'
        ]
    all_depends['itk-meta'].append('numpy')
    return all_depends
示例#2
0
from os import sys, path

try:
    from skbuild import setup
except ImportError:
    print('scikit-build is required to build from source.', file=sys.stderr)
    print('Please run:', file=sys.stderr)
    print('', file=sys.stderr)
    print('  python -m pip install scikit-build')
    sys.exit(1)

sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from itkVersion import get_versions

setup(name='itk',
      version=get_versions()['package-version'],
      author='Insight Software Consortium',
      author_email='*****@*****.**',
      packages=['itk'],
      package_dir={'itk': 'itk'},
      cmake_args=[],
      py_modules=[
          'itkBase', 'itkConfig', 'itkExtras', 'itkLazy', 'itkTemplate',
          'itkTypes', 'itkVersion', 'itkBuildOptions'
      ],
      download_url=r'https://itk.org/ITK/resources/software.html',
      description=
      r'ITK is an open-source toolkit for multidimensional image analysis',
      long_description='ITK is an open-source, cross-platform library that '
      'provides developers with an extensive suite of software '
      'tools for image analysis. Developed through extreme '
示例#3
0
文件: setup.py 项目: sbrousmiche/RTK
try:
    from skbuild import setup
except ImportError:
    print('scikit-build is required to build from source.', file=sys.stderr)
    print('Please run:', file=sys.stderr)
    print('', file=sys.stderr)
    print('  python -m pip install scikit-build')
    sys.exit(1)

sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from itkVersion import get_versions

setup(
    name='rtk',
    version=get_versions()['package-version'],
    author='RTK consortium',
    author_email='*****@*****.**',
    packages=['rtk'],
    package_dir={'itk': 'itk'},
    cmake_args=[],
    py_modules=[
        'itkRTK'
    ],
    download_url=r'https://itk.org/ITK/resources/software.html',
    description=r'ITK is an open-source toolkit for multidimensional image analysis',
    long_description='ITK is an open-source, cross-platform library that '
                     'provides developers with an extensive suite of software '
                     'tools for image analysis. Developed through extreme '
                     'programming methodologies, ITK employs leading-edge '
                     'algorithms for registering and segmenting '