Ejemplo n.º 1
0
from glob import glob

# local import
from scripts.base_setup import (check_flag, write_version_py, get_version_info,
                                get_cpptraj_info, check_compile_cython,
                                check_cython, get_package_data)
from scripts.base_setup import (compiler_env_info, setenv_cc_cxx,
                                get_ext_modules)
from scripts.base_setup import CleanCommand, is_released

# python version >= 2.6
if sys.version_info < (2, 6):
    print('You must have at least Python 2.6 for pytraj\n')
    sys.exit(1)

amber_release = check_flag('--amber_release')
disable_openmp = check_flag('--disable-openmp')
use_amberlib = not check_flag('--disable-amberlib')
openmp_flag = '-openmp' if not disable_openmp else ''
debug = check_flag('-debug')
tarfile = True if 'sdist' in sys.argv else False
rootname = os.getcwd()
pytraj_src = rootname + "/pytraj/"
cpptraj_home = os.environ.get('CPPTRAJHOME', '')

compiler_env_info('Original compiler envs')
# danger
use_pip = (any('egg_info' in arg for arg in sys.argv)
           or any('pip' in arg for arg in sys.argv)
           or any('--no-deps' in arg for arg in sys.argv))
Ejemplo n.º 2
0
# local import
from scripts.base_setup import (check_flag, write_version_py, get_version_info,
                                get_cpptraj_info, check_compile_cython,
                                check_cython, get_package_data, get_pyx_pxd)
from scripts.base_setup import (compiler_env_info, setenv_cc_cxx,
                                get_ext_modules)
from scripts.base_setup import CleanCommand, is_released

# python version >= 2.6
if sys.version_info < (2, 6):
    print('You must have at least Python 2.6 for pytraj\n')
    sys.exit(1)

try:
    if check_flag('--cythonize'):
        from Cython.Build import cythonize
        pyxfiles, _ = get_pyx_pxd()
        cythonize([pfile + '.pyx' for pfile in pyxfiles], )
        sys.exit(0)
except ImportError:
    pass

amber_release = check_flag('--amber_release')
disable_openmp = check_flag('--disable-openmp')
use_amberlib = not check_flag('--disable-amberlib')
use_prebuilt_cythonized_files = check_flag('--use-pre-cythonized')
openmp_flag = '-openmp' if not disable_openmp else ''
debug = check_flag('-debug')
tarfile = True if 'sdist' in sys.argv else False
rootname = os.getcwd()
Ejemplo n.º 3
0
# local import
from scripts.base_setup import (check_flag, check_cpptraj_version,
                                write_version_py, get_version_info,
                                get_pyx_pxd, get_include_and_lib_dir, do_what,
                                check_cython)
from scripts.base_setup import (add_openmp_flag, try_updating_libcpptraj,
                                remind_export_LD_LIBRARY_PATH)
from scripts.base_setup import CleanCommand, ISRELEASED, message_pip_need_cpptraj_home
from scripts.install_libcpptraj import DEFAULT_MAC_COMPILER  # clang

# python version >= 2.6
if sys.version_info < (2, 6):
    print('You must have at least Python 2.6 for pytraj\n')
    sys.exit(0)

amber_release = check_flag('--amber_release')
disable_openmp = check_flag('--disable-openmp')
openmp_flag = '-openmp' if not disable_openmp else ''
debug = check_flag('--debug')
use_phenix_python = check_flag('--phenix')
create_tar_file_for_release = True if 'sdist' in sys.argv else False
rootname = os.getcwd()
pytraj_home = rootname + "/pytraj/"
cpptraj_home = os.environ.get('CPPTRAJHOME', '')

if not cpptraj_home and any('pip' in arg for arg in sys.argv):
    # if pip, require to set CPPTRAJHOME
    raise EnvironmentError(message_pip_need_cpptraj_home)

has_cpptraj_in_current_folder = os.path.exists("./cpptraj/")
phenix_python_lib = os.path.join(os.environ.get('PHENIX'),