Ejemplo n.º 1
0
        def run(self):
            package = 'sherpa.astro.xspec'
            dist_packages = self.distribution.packages
            dist_data = self.distribution.package_data

            if self.with_xspec:
                if package not in dist_packages:
                    dist_packages.append(package)

                if not dist_data.has_key(package):
                    dist_data[package] = ['tests/test_*.py']

                ld1, inc1, l1 = build_lib_arrays(self, 'xspec')
                ld2, inc2, l2 = build_lib_arrays(self, 'cfitsio')
                ld3, inc3, l3 = build_lib_arrays(self, 'ccfits')
                ld4, inc4, l4 = build_lib_arrays(self, 'gfortran')

                ld, inc, l = (ld1 + ld2 + l3 + ld4, inc1 + inc2 + inc3 + inc4, l1 + l2 + l3 + l4)

                self.distribution.ext_modules.append(build_ext('xspec', ld, inc, l))

            else:
                if package in dist_packages:
                    dist_packages.remove(package)
                if dist_data.has_key(package):
                    del dist_data[package]
Ejemplo n.º 2
0
    def run(self):
        package = 'sherpa.astro.xspec'
        dist_packages = self.distribution.packages
        dist_data = self.distribution.package_data

        if self.with_xspec:
            if package not in dist_packages:
                dist_packages.append(package)

            if not dist_data.has_key(package):
                dist_data[package] = ['tests/test_*.py']

            ld1, inc1, l1 = build_lib_arrays(self, 'xspec')
            ld2, inc2, l2 = build_lib_arrays(self, 'cfitsio')
            ld3, inc3, l3 = build_lib_arrays(self, 'ccfits')
            ld4, inc4, l4 = build_lib_arrays(self, 'wcslib')
            ld5, inc5, l5 = build_lib_arrays(self, 'gfortran')

            ld = clean(ld1 + ld2 + ld3 + ld4 + ld5)
            inc = clean(inc1 + inc2 + inc3 + inc4 + inc5)
            l = clean(l1 + l2 + l3 + l4 + l5)

            self.distribution.ext_modules.append(build_ext(
                'xspec', ld, inc, l))

        else:
            if package in dist_packages:
                dist_packages.remove(package)
            if dist_data.has_key(package):
                del dist_data[package]
Ejemplo n.º 3
0
    def build_configure(self):
        configure = [
            './configure', '--prefix=' + self.install_dir, '--with-pic',
            '--enable-standalone'
        ]
        if self.group_cflags is not None:
            configure.append('GROUP_CFLAGS="' + self.group_cflags + '"')
        if self.configure != 'None':
            configure.extend(self.configure.split(' '))
        if self.fftw != 'local':
            configure.append('--enable-fftw')

        self.distribution.ext_modules.append(
            build_ext('psf', *build_lib_arrays(self, 'fftw')))
        self.distribution.ext_modules.append(
            build_ext('wcs', *build_lib_arrays(self, 'wcs')))
        ld1, inc1, l1 = build_lib_arrays(self, 'wcs')
        if self.region != 'local':
            configure.append('--enable-region')
        ld2, inc2, l2 = build_lib_arrays(self, 'region')
        ld, inc, l = (ld1 + ld2, inc1 + inc2, l1 + l2)
        self.distribution.ext_modules.append(build_ext('region', ld, inc, l))

        if self.extra_fortran_link_flags:
            flags = self.extra_fortran_link_flags.split(' ')
            from extensions import fortran_exts
            for ext in fortran_exts:
                ext.extra_link_args.extend(flags)

        if not self.disable_group:
            configure.append('--enable-group')
            self.distribution.data_files.append(('', [
                self.group_location,
            ]))

        if not self.disable_stk:
            configure.append('--enable-stk')
            self.distribution.data_files.append(('', [
                self.stk_location,
            ]))

        if self.wcs != 'local':
            configure.append('--enable-wcs')

        self.warn('built configure string' + str(configure))

        return configure
Ejemplo n.º 4
0
    def build_configure(self):
        configure = ["./configure", "--prefix=" + self.install_dir, "--with-pic", "--enable-standalone"]
        if self.group_cflags is not None:
            configure.append('GROUP_CFLAGS="' + self.group_cflags + '"')
        if self.configure != "None":
            configure.extend(self.configure.split(" "))
        if self.fftw != "local":
            configure.append("--enable-fftw")

        self.distribution.ext_modules.append(build_ext("psf", *build_lib_arrays(self, "fftw")))
        self.distribution.ext_modules.append(build_ext("wcs", *build_lib_arrays(self, "wcs")))
        ld1, inc1, l1 = build_lib_arrays(self, "wcs")
        if self.region != "local":
            configure.append("--enable-region")
        ld2, inc2, l2 = build_lib_arrays(self, "region")
        ld, inc, l = (ld1 + ld2, inc1 + inc2, l1 + l2)
        self.distribution.ext_modules.append(build_ext("region", ld, inc, l))

        if self.extra_fortran_link_flags:
            flags = self.extra_fortran_link_flags.split(" ")
            from extensions import fortran_exts

            for ext in fortran_exts:
                ext.extra_link_args.extend(flags)

        if not self.disable_group:
            configure.append("--enable-group")
            self.distribution.data_files.append(("", [self.group_location]))

        if not self.disable_stk:
            configure.append("--enable-stk")
            self.distribution.data_files.append(("", [self.stk_location]))

        if self.wcs != "local":
            configure.append("--enable-wcs")

        self.warn("built configure string" + str(configure))

        return configure
Ejemplo n.º 5
0
        def build_configure(self):
            configure = ['./configure', '--prefix='+self.install_dir, '--with-pic', '--enable-standalone']
            if self.group_cflags is not None:
                configure.append('GROUP_CFLAGS="'+self.group_cflags+'"')
            if self.configure != 'None':
                configure.extend(self.configure.split(' '))
            if self.fftw != 'local':
                configure.append('--enable-fftw')

            self.distribution.ext_modules.append(build_ext('psf', *build_lib_arrays(self, 'fftw')))
            self.distribution.ext_modules.append(build_ext('wcs', *build_lib_arrays(self, 'wcs')))
            ld1, inc1, l1 = build_lib_arrays(self, 'wcs')
            if self.region != 'local':
                configure.append('--enable-region')
            ld2, inc2, l2 = build_lib_arrays(self, 'region')
            ld, inc, l = (ld1+ld2, inc1+inc2, l1+l2)
            self.distribution.ext_modules.append(build_ext('region', ld, inc, l))

            if self.extra_fortran_link_flags:
                flags = self.extra_fortran_link_flags.split(' ')
                from extensions import fortran_exts
                for ext in fortran_exts:
                    ext.extra_link_args.extend(flags)

            if not self.disable_group:
                configure.append('--enable-group')
                self.distribution.data_files.append(('', [self.group_location,]))

            if not self.disable_stk:
                configure.append('--enable-stk')
                self.distribution.data_files.append(('', [self.stk_location,]))

            if self.wcs != 'local':
                configure.append('--enable-wcs')

            self.warn('built configure string' + str(configure))

            return configure