Source
xxxxxxxxxx
fd.write(' " Version " + version_string() + " Platform: " + platform.platform() + " Start time: " + telemetry_starttime + " Variant: " + package_variant)\n')
#!/usr/bin/env python3
# Copyright (C) 2018
# Associated Universities, Inc. Washington DC, USA.
#
# 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 Library General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
#
# Correspondence concerning AIPS++ should be addressed as follows:
# Internet email: aips2-request@nrao.edu.
# Postal address: AIPS++ Project Office
# National Radio Astronomy Observatory
# 520 Edgemont Road
# Charlottesville, VA 22903-2475 USA
"""CASAtasks Python Module
This is a standard python module that provides CASA tools and tasks
without regular CASA's bespoke CLI.
"""
from __future__ import division, print_function
classifiers = """\
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Programming Language :: Python :: 2.7
Programming Language :: C++
Topic :: Software Development
Topic :: Scientific/Engineering :: Astronomy
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: MacOS :: MacOS X
Operating System :: POSIX
"""
##
## Without this zlib import at the beginning, building the casataks
## wheel on RHEL7 (w/ rh-python36-python-3.6.3-3.el7.x86_64) dies
## with a segmentation violation at:
##
## #0 0x00007f1d192ecf89 in fill_window () from /lib64/libz.so.1
## #1 0x00007f1d192ed590 in deflate_slow () from /lib64/libz.so.1
## #2 0x00007f1d192ee624 in deflate () from /lib64/libz.so.1
## #3 0x00007f1d0851a195 in zlib_Compress_compress () from /opt/rh/rh-python36/root/usr/lib64/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
##
import zlib
import sys
import os
try:
import casatools
from casatools.config import build as tools_config
except:
print("cannot find CASAtools (https://open-bitbucket.nrao.edu/projects/CASA/repos/casatools/browse) in PYTHONPATH")
os._exit(1)
from setuptools import setup, find_packages
from distutils.dir_util import copy_tree, remove_tree
from distutils.util import get_platform
from distutils.cmd import Command
from distutils.command.build import build
from subprocess import Popen, PIPE
from subprocess import call as Proc
from datetime import datetime
from textwrap import dedent
from shutil import copy2
import subprocess
import sysconfig
import pickle
import errno
import time
import re
from os import listdir
from os.path import isfile, join, islink
from itertools import chain
import argparse
parser=argparse.ArgumentParser()
parser.add_argument('--version', help='version')
parser.add_argument('bdist_wheel', help='bdist_wheel')