Source
status=call("for f in `ls`; do if [[ $(otool -l $f | grep \"path /opt/local/lib\" | grep -v \"/opt/local/lib/.*gcc\") ]];then install_name_tool -rpath /opt/local/lib @loader_path:@loader_path/lib:@rpath $f ;fi; done",cwd=casac_lib_dir,shell=True)
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022 CASA project
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Correspondence concerning CASA should be addressed as follows:
# Internet email: casa-feedback@nrao.edu.
"""CASA Python Module
This is a standard python module that provides CASA tools and tasks
without regular CASA's bespoke CLI.
"""
import os
import re
import sys
import shutil
import platform
import subprocess
from subprocess import call as Proc
import glob
from setuptools import setup, Extension
from distutils.command.build import build
from setuptools.command.build_ext import build_ext
from urllib import request
from shutil import copyfileobj
from distutils.dir_util import copy_tree
casacpp_user_options = [
("with-casacpp=", None, "location where casacpp is installed")
]
mod_closure = False
class XmlCMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
class XmlCMakeBuild(build):
user_options = build.user_options + casacpp_user_options
def initialize_options(self):
super().initialize_options()
self.with_casacpp = None