Changeset 2384


Ignore:
Timestamp:
Feb 22, 2010 12:54:39 AM (9 years ago)
Author:
wehart
Message:

Updated coopr_install due to changes
in pyutilib.virtual that check to ensure that
urlopen() is called with the correct arguments.

Added a warning when installing with Python 2.4

Location:
coopr.misc/trunk/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.misc/trunk/util/coopr.py

    r2273 r2384  
    3535                self.add_repository('coopr.'+pkg, root='https://projects.coin-or.org/svn/CoinBazaar/projects/coopr.'+pkg, dev=True, username=os.environ.get('COINOR_USERNAME',None))
    3636
     37    def install_packages(self, options):
     38        Installer.install_packages(self, options)
     39        if sys.version_info[:2] < (2,5):
     40            print ""
     41            print "-----------------------------------------------------------------"
     42            print " WARNING: Most Coopr packages will only work with Python 2.5 or"
     43            print "          newer.  You have installed Coopr with:"
     44            print sys.version
     45            print "-----------------------------------------------------------------"
     46
     47            print ""
    3748
    3849def create_installer():
  • coopr.misc/trunk/util/coopr_install

    r2341 r2384  
    27062706        #print versions
    27072707    else:
    2708         output = urllib2.urlopen(svndir, timeout=30).read()
     2708        if sys.version_info[:2] <= (2,5):
     2709            output = urllib2.urlopen(svndir).read()
     2710        else:
     2711            output = urllib2.urlopen(svndir, timeout=30).read()
    27092712        if output=="":
    27102713            return None
     
    28362839                rootdir_output = commands.getoutput('svn ls ' + self.config.root)
    28372840            else:
    2838                 rootdir_output = urllib2.urlopen(self.config.root, timeout=30).read()
     2841                if sys.version_info[:2] <= (2,5):
     2842                    rootdir_output = urllib2.urlopen(self.config.root).read()
     2843                else:
     2844                    rootdir_output = urllib2.urlopen(self.config.root, timeout=30).read()
    28392845            try:
    28402846                self.trunk = self.config.root+'/trunk'
     
    36413647                file = os.path.dirname(self.config_file)+"/"+file
    36423648            try:
    3643                 output = urllib2.urlopen(file, timeout=30).read()
     3649                if sys.version_info[:2] <= (2,5):
     3650                    output = urllib2.urlopen(file).read()
     3651                else:
     3652                    output = urllib2.urlopen(file, timeout=30).read()
    36443653            except Exception, err:
    36453654                print "Problems opening configuration url:",file
     
    38553864                self.add_repository('coopr.'+pkg, root='https://projects.coin-or.org/svn/CoinBazaar/projects/coopr.'+pkg, dev=True, username=os.environ.get('COINOR_USERNAME',None))
    38563865
     3866    def install_packages(self, options):
     3867        Installer.install_packages(self, options)
     3868        if sys.version_info[:2] < (2,5):
     3869            print ""
     3870            print "-----------------------------------------------------------------"
     3871            print " WARNING: Most Coopr packages will only work with Python 2.5 or"
     3872            print "          newer.  You have installed Coopr with:"
     3873            print sys.version
     3874            print "-----------------------------------------------------------------"
     3875
     3876            print ""
    38573877
    38583878def create_installer():
Note: See TracChangeset for help on using the changeset viewer.