X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/aea841b4127bacfa23de320d95bbd8efec2b9a08..968613a336f2fff832f9085e69b990e7371ca8e5:/setup.py diff --git a/setup.py b/setup.py index 37af4d2c09..d5ad57bf9e 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,7 @@ +# Copyright (c) 2019-2023. The SimGrid Team. All rights reserved. +# This program is free software; you can redistribute it and/or modify it +# under the terms of the license (GNU LGPL-2.1-only) which comes with this package. # python3 setup.py sdist # Build a source distrib (building binary distribs is complex on linux) @@ -30,53 +33,50 @@ class CMakeBuild(build_ext): try: out = subprocess.check_output(['cmake', '--version']) except OSError: - raise RuntimeError("CMake must be installed to build python bindings of SimGrid") - - if not os.path.exists("MANIFEST.in"): - raise RuntimeError("Please generate a MANIFEST.in file (configure simgrid, and copy it here if you build out of tree)") + raise RuntimeError( + "CMake must be installed to build python bindings of SimGrid") - if platform.system() == "Windows": - cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1)) - if cmake_version < '3.1.0': - raise RuntimeError("CMake >= 3.1.0 is required on Windows") + if not os.path.exists("MANIFEST.in"): + raise RuntimeError( + "Please generate a MANIFEST.in file (configure simgrid, and copy it here if you build out of tree)") for ext in self.extensions: self.build_extension(ext) def build_extension(self, ext): - extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) + from pybind11 import get_cmake_dir + extdir = os.path.abspath(os.path.dirname( + self.get_ext_fullpath(ext.name))) cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_EXECUTABLE=' + sys.executable, '-Denable_smpi=OFF', - '-Denable_java=OFF', '-Denable_python=ON', - '-Dminimal-bindings=ON'] + '-Dminimal-bindings=ON', + '-Dpybind11_DIR=' + get_cmake_dir() + ] cfg = 'Debug' if self.debug else 'Release' build_args = ['--config', cfg] - if platform.system() == "Windows": - cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] - if sys.maxsize > 2**32: - cmake_args += ['-A', 'x64'] - build_args += ['--', '/m'] - else: - cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] - build_args += ['--', '-j4'] + cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] + build_args += ['--', '-j4'] env = os.environ.copy() env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), self.distribution.get_version()) if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) - subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) - subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) + subprocess.check_call(['cmake', ext.sourcedir] + + cmake_args, cwd=self.build_temp, env=env) + subprocess.check_call(['cmake', '--build', '.'] + + build_args, cwd=self.build_temp) + setup( name='simgrid', - version='3.23.1', + version='3.32.1', author='Da SimGrid Team', - author_email='simgrid-devel@lists.gforge.inria.fr', + author_email='simgrid-community@inria.fr', description='Toolkit for scalable simulation of distributed applications', long_description=("SimGrid is a scientific instrument to study the behavior of " "large-scale distributed systems such as Grids, Clouds, HPC or P2P " @@ -87,32 +87,30 @@ setup( "sudo apt install cmake libboost-dev pybind11-dev g++ gcc"), ext_modules=[CMakeExtension('simgrid')], cmdclass=dict(build_ext=CMakeBuild), - install_requires=['pybind11>=2.3'], - setup_requires=['pybind11>=2.3'], + install_requires=['pybind11>=2.4'], + setup_requires=['pybind11>=2.4'], zip_safe=False, classifiers=[ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: Education", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", - "Operating System :: POSIX", - "Operating System :: MacOS", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3", - "Programming Language :: C++", - "Programming Language :: C", - "Programming Language :: Fortran", - "Programming Language :: Java", - "Topic :: System :: Distributed Computing", - "Topic :: System :: Systems Administration", + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Education", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", + "Operating System :: POSIX", + "Operating System :: MacOS", + "Programming Language :: Python :: 3", + "Programming Language :: C++", + "Programming Language :: C", + "Programming Language :: Fortran", + "Topic :: System :: Distributed Computing", + "Topic :: System :: Systems Administration", ], url="https://simgrid.org", project_urls={ - 'Tracker': 'https://framagit.org/simgrid/simgrid/issues/', - 'Source': 'https://framagit.org/simgrid/simgrid/', - 'Documentation': 'https://simgrid.org/doc/latest/', + 'Tracker': 'https://framagit.org/simgrid/simgrid/issues/', + 'Source': 'https://framagit.org/simgrid/simgrid/', + 'Documentation': 'https://simgrid.org/doc/latest/', }, )