Beispiel #1
0
 def get(self):
     if os.path.exists(self.archive_path):
         utils.output("%s already present, skipping step." % BASENAME)
         return
     
     utils.goto_archive()
     utils.urlget(URL)
Beispiel #2
0
    def get(self):
        if os.path.exists(self.archive_path):
            utils.output("SWIG already downloaded, skipping step.")

        else:
            utils.goto_archive()
            utils.urlget(SWIG_URL)
Beispiel #3
0
    def get(self):
        if os.path.exists(self.archive_path):
            utils.output("SWIG already downloaded, skipping step.")

        else:
            utils.goto_archive()
            utils.urlget(SWIG_URL)
Beispiel #4
0
    def get(self):
        if os.path.exists(self.archive_path):
            utils.output("%s already present, skipping step." % BASENAME)
            return

        utils.goto_archive()
        utils.urlget(URL)
Beispiel #5
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone VTK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            ret = os.system("git checkout %s" % (GIT_TAG, ))
            if ret != 0:
                utils.error("Could not checkout VTK %s. Fix and try again." %
                            (GIT_TAG, ))

        if not os.path.exists(self.exc_patch_dst):
            utils.output("Applying EXC patch")
            # we do this copy so we can see if the patch has been done yet or not
            shutil.copyfile(self.exc_patch_src, self.exc_patch_dst)

            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system("%s -p1 < %s" % (config.PATCH, self.exc_patch_dst))

            if ret != 0:
                utils.error("Could not apply EXC patch.  Fix and try again.")
Beispiel #6
0
 def get(self):
     if os.path.exists(self.tbfilename):
         utils.output("%s already present, not downloading." %
                      (SCIPY_ARCHIVE,))
     else:
         utils.goto_archive()
         utils.urlget(SCIPY_URL, SCIPY_ARCHIVE)
Beispiel #7
0
 def get(self):
     if os.path.exists(self.tbfilename):
         utils.output("%s already present, not downloading." %
                      (SCIPY_ARCHIVE, ))
     else:
         utils.goto_archive()
         utils.urlget(SCIPY_URL, SCIPY_ARCHIVE)
Beispiel #8
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone VTK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            ret = os.system("git checkout %s" % (GIT_TAG,))
            if ret != 0:
                utils.error("Could not checkout VTK %s. Fix and try again." % (GIT_TAG,))


        if not os.path.exists(self.exc_patch_dst):
            utils.output("Applying EXC patch")
            # we do this copy so we can see if the patch has been done yet or not
            shutil.copyfile(self.exc_patch_src, self.exc_patch_dst)

            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system(
                "%s -p1 < %s" % (config.PATCH, self.exc_patch_dst))

            if ret != 0:
                utils.error(
                    "Could not apply EXC patch.  Fix and try again.")
Beispiel #9
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("ITK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone ITK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            # FIXME: error checking
            ret = os.system("git submodule update --init")

            ret = os.system("git checkout %s" % (GIT_TAG,))
            if ret != 0:
                utils.error("Could not checkout ITK 4.0.0. Fix and try again.")

            # FIXME: error checking
            ret = os.system("git submodule update")

        # also the source dir for other installpackages that wish to build
        # WrapITK external projects
        # itkvtkglue needs this during its get() stage!
        config.WRAPITK_SOURCE_DIR = os.path.join(self.source_dir,
                                            'Wrapping/WrapITK')

        # now apply patch if necessary
        # only on win64
        if config.WINARCH_STR != "x64":
            return
Beispiel #10
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("ITK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone ITK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            # FIXME: error checking
            ret = os.system("git submodule update --init")

            ret = os.system("git checkout %s" % (GIT_TAG, ))
            if ret != 0:
                utils.error("Could not checkout ITK 4.0.0. Fix and try again.")

            # FIXME: error checking
            ret = os.system("git submodule update")

        # also the source dir for other installpackages that wish to build
        # WrapITK external projects
        # itkvtkglue needs this during its get() stage!
        config.WRAPITK_SOURCE_DIR = os.path.join(self.source_dir,
                                                 'Wrapping/WrapITK')

        # now apply patch if necessary
        # only on win64
        if config.WINARCH_STR != "x64":
            return
Beispiel #11
0
    def get(self):
        if os.path.exists(self.afilename):
            utils.output("%s already present, not downloading." %
                         (WXP_ARCHIVE, ))

        else:
            utils.goto_archive()
            utils.urlget(WXP_URL)

        if os.name == 'posix':
            if not os.path.exists(self.patch1_dst):
                shutil.copy(self.patch1_src, self.patch1_dst)
    def get(self):
        if os.path.exists(self.afilename):
            utils.output("%s already present, not downloading." %
                         (WXP_ARCHIVE,))

        else:
            utils.goto_archive()
            utils.urlget(WXP_URL)

        if os.name == 'posix':
            if not os.path.exists(self.patch1_dst):
                shutil.copy(
                        self.patch1_src,
                        self.patch1_dst)
Beispiel #13
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("Template Workbench already checked out, skipping step.")

        else:
            utils.goto_archive()
            
            ret = os.system("hg clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone Template Workbench repository. Fix and try again.")
            
            os.chdir(self.source_dir)
            ret = os.system("hg update") #TODO: is this required?
            if ret != 0:
                utils.error("Could not update Template Workbench. Fix and try again.")
Beispiel #14
0
    def get(self):
        if os.path.exists(self.ez_afilename):
            utils.output("%s already present, not downloading." %
                         (EZ_BASENAME,))

        else:
            utils.goto_archive()
            utils.urlget(EZ_SETUP_URL)
            
        if os.path.exists(self.pip_afilename):
            utils.output("%s already present, not downloading." %
                         (PIP_BASENAME,))

        else:
            utils.goto_archive()
            utils.urlget(PIP_URL)
Beispiel #15
0
    def get(self):
        if os.path.exists(self.ipy_afilename):
            utils.output("%s already present, not downloading." %
                         (IPY_ARCHIVE,))

        else:
            utils.goto_archive()
            utils.urlget(IPY_URL)

        if os.name == 'nt':
            if os.path.exists(self.pyrl_afilename):
                utils.output("%s already present, not downloading." %\
                        (PYRL_ARCHIVE,))
            else:
                utils.goto_archive()
                utils.urlget(PYRL_URL)
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("Ortho Assist already checked out, skipping step.")

        else:
            utils.goto_archive()
           
            ret = os.system("hg clone %s %s" % (HG_REPO, BASENAME))
			
            if ret != 0:
                utils.error("Could not clone Ortho Assist repository.  Fix and try again.")
            
            os.chdir(self.source_dir)
            ret = os.system("hg update")
            if ret != 0:
                utils.error("Could not update Ortho Assist. Fix and try again.")
Beispiel #17
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone VTK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            ret = os.system("git checkout %s" % (GIT_TAG, ))
            if ret != 0:
                utils.error("Could not checkout VTK %s. Fix and try again." %
                            (GIT_TAG, ))

            # EXC PATCH
            utils.output("Applying EXC patch")
            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system("%s -p1 < %s" %
                            (config.PATCH, self.exc_patch_filename))
            if ret != 0:
                utils.error("Could not apply EXC patch.  Fix and try again.")

            # VTKPRPRTY PATCH
            utils.output("Applying VTKPRPRTY patch")
            os.chdir(os.path.join(self.source_dir, 'Rendering'))
            ret = os.system("%s -p0 < %s" %
                            (config.PATCH, self.vtkprprty_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply VTKPRPRTY patch.  Fix and try again.")

            # WXVTKRWI_DISPLAYID_SEGFAULT patch
            utils.output("Applying VTKWXRWI_DISPLAYID_SEGFAULT patch")
            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system("%s -p1 < %s" %
                            (config.PATCH,
                             self.wxvtkrwi_displayid_segfault_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply WXVTKRWI_DISPLAYID_SEGFAULT patch.  Fix and try again."
                )
Beispiel #18
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("git clone %s %s" % (GIT_REPO, BASENAME))
            if ret != 0:
                utils.error("Could not clone VTK repo.  Fix and try again.")

            os.chdir(self.source_dir)
            ret = os.system("git checkout %s" % (GIT_TAG,))
            if ret != 0:
                utils.error("Could not checkout VTK %s. Fix and try again." % (GIT_TAG,))


            # EXC PATCH
            utils.output("Applying EXC patch")
            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system(
                "%s -p1 < %s" % (config.PATCH, self.exc_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply EXC patch.  Fix and try again.")

            # VTKPRPRTY PATCH
            utils.output("Applying VTKPRPRTY patch")
            os.chdir(os.path.join(self.source_dir, 'Rendering'))
            ret = os.system(
                "%s -p0 < %s" % (config.PATCH, self.vtkprprty_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply VTKPRPRTY patch.  Fix and try again.")

            # WXVTKRWI_DISPLAYID_SEGFAULT patch
            utils.output("Applying VTKWXRWI_DISPLAYID_SEGFAULT patch")
            os.chdir(self.source_dir)
            # default git-generated patch, so needs -p1
            ret = os.system(
                "%s -p1 < %s" % (config.PATCH, 
                    self.wxvtkrwi_displayid_segfault_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply WXVTKRWI_DISPLAYID_SEGFAULT patch.  Fix and try again.")
Beispiel #19
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()
            ret = os.system("%s -d %s co %s %s" %
                            (config.CVS, CVS_REPO, CVS_VERSION, BASENAME))
            if ret != 0:
                utils.error("Could not CVS checkout.  Fix and try again.")

            #self.update_wpvi()

            # EXC PATCH
            utils.output("Applying EXC patch")
            os.chdir(self.source_dir)
            ret = os.system(
                "%s -p0 < %s" % (config.PATCH, self.exc_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply EXC patch.  Fix and try again.")

            # VTKPRPRTY PATCH
            utils.output("Applying VTKPRPRTY patch")
            os.chdir(os.path.join(self.source_dir, 'Rendering'))
            ret = os.system(
                "%s -p0 < %s" % (config.PATCH, self.vtkprprty_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply VTKPRPRTY patch.  Fix and try again.")

        # this is the correct way to handle patches:
        # only download patch if we don't have it
        if not os.path.exists(self.vtkft_patch_dst_filename):
            shutil.copy(self.vtkft_patch_src_filename,
                        self.vtkft_patch_dst_filename)

            # always try to apply patch if we've just copied it
            utils.output("Applying vtkfreetype_segfault patch")
            os.chdir(self.source_dir)
            ret = os.system(
                "%s -p0 < %s" % (config.PATCH, self.vtkft_patch_dst_filename))

            if ret != 0:
                utils.error(
                    "Could not apply vtkfreetype_segfault patch.  Fix and try again.")
Beispiel #20
0
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("VTK already checked out, skipping step.")

        else:
            utils.goto_archive()
            ret = os.system("%s -d %s co %s %s" %
                            (config.CVS, CVS_REPO, CVS_VERSION, BASENAME))
            if ret != 0:
                utils.error("Could not CVS checkout.  Fix and try again.")

            #self.update_wpvi()

            # EXC PATCH
            utils.output("Applying EXC patch")
            os.chdir(self.source_dir)
            ret = os.system("%s -p0 < %s" %
                            (config.PATCH, self.exc_patch_filename))
            if ret != 0:
                utils.error("Could not apply EXC patch.  Fix and try again.")

            # VTKPRPRTY PATCH
            utils.output("Applying VTKPRPRTY patch")
            os.chdir(os.path.join(self.source_dir, 'Rendering'))
            ret = os.system("%s -p0 < %s" %
                            (config.PATCH, self.vtkprprty_patch_filename))
            if ret != 0:
                utils.error(
                    "Could not apply VTKPRPRTY patch.  Fix and try again.")

        # this is the correct way to handle patches:
        # only download patch if we don't have it
        if not os.path.exists(self.vtkft_patch_dst_filename):
            shutil.copy(self.vtkft_patch_src_filename,
                        self.vtkft_patch_dst_filename)

            # always try to apply patch if we've just copied it
            utils.output("Applying vtkfreetype_segfault patch")
            os.chdir(self.source_dir)
            ret = os.system("%s -p0 < %s" %
                            (config.PATCH, self.vtkft_patch_dst_filename))

            if ret != 0:
                utils.error(
                    "Could not apply vtkfreetype_segfault patch.  Fix and try again."
                )
    def install_nt(self):
        if os.path.exists(os.path.join(
            config.PYTHON_SITE_PACKAGES, 'wxversion.py')):
            utils.output('wxPython already installed.')
            return

        utils.goto_archive()
        # Inno Setup installer, run in unattended mode
        # http://unattended.sourceforge.net/installers.php
        # he installer complains at the end that it can't find the right python
        # to byte compile. To work around this, TEMPORARILY add the following to the
        # registry: [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath] 
        # ="C:\build\jwd\inst\python\"
        # use the built-in _winreg module for this.
        cmd = '%s /DIR=%s /sp- /silent /norestart' % \
        (WXP_ARCHIVE, config.PYTHON_SITE_PACKAGES)
        ret = os.system(cmd)
        if ret != 0:
            utils.error('Error installing wxPython.')
Beispiel #22
0
    def update_wpvi(self):
        """Update Wrapping/Python/vtk/__init__.py to fix nasty DL bug
        on AMD64.  Thanks to Mathieu Malaterre for finding this!

        Not necessary on VTK-5-2 20080802.

        Keeping this as example on how to update select files in
        checkout.
        """

        utils.output("Updating Wrapping/Python/vtk/__init__.py.")

        utils.goto_archive()
        os.chdir(os.path.join(BASENAME, 'Wrapping', 'Python', 'vtk'))

        ret1 = os.system("%s -z3 update -r 1.14 __init__.py" % (config.CVS, ))

        if ret1 != 0:
            utils.error("Error updating W/P/v/__init__.py.")
    def get(self):
        if os.path.exists(self.source_dir):
            utils.output("Ortho Assist already checked out, skipping step.")

        else:
            utils.goto_archive()

            ret = os.system("hg clone %s %s" % (HG_REPO, BASENAME))

            if ret != 0:
                utils.error(
                    "Could not clone Ortho Assist repository.  Fix and try again."
                )

            os.chdir(self.source_dir)
            ret = os.system("hg update")
            if ret != 0:
                utils.error(
                    "Could not update Ortho Assist. Fix and try again.")
Beispiel #24
0
def download_python():
    urlbase = 'http://python.org/ftp/python/%s' % (PYVER_STR,)
    if os.name == 'posix':
        fname = 'Python-%s.tar.bz2' % (PYVER_STR,)
        url = '%s/%s' % (urlbase, fname)
    elif os.name == 'nt':
        if config.WINARCH == '32bit':
            fname = 'python-%s.msi' % (PYVER_STR,)
            url = '%s/%s' % (urlbase, fname) 
        else:
            fname = 'python-%s.amd64.msi' % (PYVER_STR,)
            url = '%s/%s' % (urlbase, fname)
            
        print "##### Bootstrapping with %s Python. #####" % (config.WINARCH,)

    utils.goto_archive()
    utils.urlget(url)

    return fname
Beispiel #25
0
    def install_nt(self):
        if os.path.exists(
                os.path.join(config.PYTHON_SITE_PACKAGES, 'wxversion.py')):
            utils.output('wxPython already installed.')
            return

        utils.goto_archive()
        # Inno Setup installer, run in unattended mode
        # http://unattended.sourceforge.net/installers.php
        # he installer complains at the end that it can't find the right python
        # to byte compile. To work around this, TEMPORARILY add the following to the
        # registry: [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath]
        # ="C:\build\jwd\inst\python\"
        # use the built-in _winreg module for this.
        cmd = '%s /DIR=%s /sp- /silent /norestart' % \
        (WXP_ARCHIVE, config.PYTHON_SITE_PACKAGES)
        ret = os.system(cmd)
        if ret != 0:
            utils.error('Error installing wxPython.')
Beispiel #26
0
    def update_wpvi(self):
        """Update Wrapping/Python/vtk/__init__.py to fix nasty DL bug
        on AMD64.  Thanks to Mathieu Malaterre for finding this!

        Not necessary on VTK-5-2 20080802.

        Keeping this as example on how to update select files in
        checkout.
        """

        utils.output("Updating Wrapping/Python/vtk/__init__.py.")

        utils.goto_archive()
        os.chdir(os.path.join(BASENAME, 'Wrapping', 'Python', 'vtk'))

        ret1 = os.system(
        "%s -z3 update -r 1.14 __init__.py" %
        (config.CVS,))

        if ret1 != 0:
            utils.error("Error updating W/P/v/__init__.py.")