def configuration(parent_package='', top_path=None): ''' ''' config = Configuration('', parent_package, top_path, package_dir=packageDir) # LIBSIGNAL path = os.path.join(root_dir, 'core', 'src') files = [ os.path.join(path, 'moving_average.c'), ] printRaw(files) config.add_extension(get_lib_name('signal'), sources=files) # LIBRT130 path = os.path.join(root_dir, 'packages', 'reftek', 'src') files = [ os.path.join(path, 'rt_130wrapper_py.c'), os.path.join(path, 'rt_130_py.c') ] printRaw(files) config.add_extension('rt_130_py', sources=files) return config
packageDir = {'': 'lib', 'psysmon.artwork': 'lib/psysmon/artwork'} packageData = {'psysmon.artwork': ['splash/psysmon.png']} # Define additinal files to be copied. #dataFiles = ('artwork', ['lib/psysmon/artwork/splash/splash.png']) # Define the package requirements. requirements = [('mpl_toolkits.basemap', '1.0.7'), ('lxml', '2.3.2'), ('matplotlib', '1.3.0'), ('numpy', '1.8.1'), ('MySQLdb', '1.2.3'), ('obspy', '0.9.2'), ('pillow', '2.3.0'), ('cairo', '1.8.8'), ('Pyro4', '4.32'), ('scipy', '0.13.1'), ('sqlalchemy', '0.9.8'), ('wx', '3.0.0')] # Let the user know what's going on. printLine() printRaw("BUILDING PSYSMON") printStatus('pSysmon', __version__) printStatus('python', sys.version) printStatus('platform', sys.platform) if sys.platform == 'win32': printStatus('Windows version', sys.getwindowsversion()) printRaw("") printRaw("REQUIRED DEPENDENCIES") requirements_fullfilled = True for cur_name, cur_version in requirements: if not checkForPackage(cur_name, cur_version): requirements_fullfilled = False if not requirements_fullfilled:
:license: GNU General Public License, Version 3 (http://www.gnu.org/licenses/gpl-3.0.html) ''' import os import sys from pkg_resources import parse_version from setupExt import printStatus, printMessage, printLine, printRaw, \ checkForPackage, get_data_files # Check the environment variables for the headless option. # Install psysmon in development mode without GUI support using the command "psysmon_headless=1 pip install -e ./psysmon" headless = False headless_var = os.environ.get("psysmon_headless", None) printRaw("headless_var: ") printRaw(headless_var) if headless_var is not None and (int(headless_var) == 1): printMessage("Installing in headless mode.") headless = True # Check for mandatory modules. try: import numpy # @UnusedImport # NOQA except ImportError: printLine() printRaw("MISSING REQUIREMENT") printStatus('numpy', 'Missing module') printMessage( 'Numpy is needed to run the psysmon setup script. Please install it first.' )