[MacPorts] #41411: py27-spatialite failes to build
#41411: py27-spatialite failes to build ------------------------+-------------------------------- Reporter: aruminat@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: py27-spatialite ------------------------+-------------------------------- py27-spatialite failes to build. 0SX 10.9, xcode 5.0.2, MacPorts 2.2.1. $ sudo port clean --all py27-spatialite && sudo port upgrade py27-spatialite [snip] ---> Building py27-spatialite Error: org.macports.build for port py27-spatialite returned: command execution failed -- Ticket URL: <https://trac.macports.org/ticket/41411> MacPorts <http://www.macports.org/> Ports system for OS X
#41411: py27-spatialite: IndexError: list index out of range ------------------------------+-------------------------- Reporter: aruminat@… | Owner: and.damore@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: py27-spatialite | ------------------------------+-------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => and.damore@… Old description:
py27-spatialite failes to build. 0SX 10.9, xcode 5.0.2, MacPorts 2.2.1. $ sudo port clean --all py27-spatialite && sudo port upgrade py27-spatialite [snip] ---> Building py27-spatialite Error: org.macports.build for port py27-spatialite returned: command execution failed
New description: py27-spatialite failes to build. [[br]] 0SX 10.9, xcode 5.0.2, MacPorts 2.2.1. {{{ $ sudo port clean --all py27-spatialite && sudo port upgrade py27-spatialite [snip] ---> Building py27-spatialite Error: org.macports.build for port py27-spatialite returned: command execution failed }}} -- -- Ticket URL: <https://trac.macports.org/ticket/41411#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#41411: py27-spatialite: IndexError: list index out of range ------------------------------+-------------------------- Reporter: aruminat@… | Owner: and.damore@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: py27-spatialite | ------------------------------+-------------------------- Comment (by svohara@…): The problem with the current py27-spatialite port is that at one step in running the setup.py, the script looks to download the latest version of libspatialite-amalgamation-{VER}.zip from the hosting website. There are two problems in the code for doing this, as I detail below. The problems I found are located in the get_amalgamation() function below. {{{ def get_amalgamation(): """Download the Spatialite amalgamation if it isn't there, already.""" if os.path.exists(AMALGAMATION_ROOT): return os.mkdir(AMALGAMATION_ROOT) print "Downloading amalgation." # find out what's current amalgamation ZIP file download_page = urllib.urlopen('''"http://www.gaia- gis.it/spatialite-2.3.1/sources.html"''').read() pattern = re.compile("(libspatialite-amalgamation.*?\.zip)") download_file = pattern.findall(download_page)[0] amalgamation_url = "http://www.gaia-gis.it/spatialite-2.3.1/" + download_file zip_dir = string.replace(download_file,'.zip','') # and download it urllib.urlretrieve(amalgamation_url, "tmp.zip") }}} 1) The base url of the download page has changed. The correct url seems to be as follows: http://www.gaia-gis.it/gaia-sins/libspatialite-sources/. This affects the line of code starting with download_page = ..., as well as amalgamation_url = ... The result of this error is that the pattern.findall() function returns an empty list, and thus we get the invalid index exception. 2) The regular expression finds all zip files starting with "libspatialite-amalgamation", which returns results like the following on the webpage I retrieved from the updated url. {{{ ['libspatialite-amalgamation-2.3.0.zip', 'libspatialite-amalgamation-2.3.0.zip', 'libspatialite-amalgamation-2.3.1.zip', 'libspatialite-amalgamation-2.3.1.zip', 'libspatialite-amalgamation-2.4.0-3.zip', 'libspatialite-amalgamation-2.4.0-3.zip', 'libspatialite-amalgamation-2.4.0-4.zip', 'libspatialite-amalgamation-2.4.0-4.zip', 'libspatialite-amalgamation-2.4.0-5.zip', 'libspatialite-amalgamation-2.4.0-5.zip', 'libspatialite-amalgamation-2.4.0.zip', 'libspatialite-amalgamation-2.4.0.zip', 'libspatialite-amalgamation-3.0.0-beta.zip', 'libspatialite-amalgamation-3.0.0-beta.zip', 'libspatialite-amalgamation-3.0.0-beta1a.zip', 'libspatialite-amalgamation-3.0.0-beta1a.zip', 'libspatialite-amalgamation-3.0.0-beta1b.zip', 'libspatialite-amalgamation-3.0.0-beta1b.zip', 'libspatialite-amalgamation-3.0.0-stable.zip', 'libspatialite-amalgamation-3.0.0-stable.zip', 'libspatialite-amalgamation-3.0.1.zip', 'libspatialite-amalgamation-3.0.1.zip'] }}} However, in the code, the first entry in this list is taken as the "current" amalgamation zip file, which by looking at the version numbers is wrong. Even after fixing the download and amalgamation urls, you still have the problem that 2.3.0 will always be downloaded, even though it appears there is a 2.4.0 version, as well as 3.x. Without knowing more, I don't know which is the correct version for compatibility with the rest of the port. 3) In addition, there is a spelling issue in the print statement which follows the os.mkdir(AMALGAMATION_ROOT). The print statement outputs: 'amalgation' instead of 'amalgamation'. Obviously this is not a functional defect, but you may wish to correct the spelling mistake in the same commit. -- Ticket URL: <https://trac.macports.org/ticket/41411#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#41411: py27-spatialite: IndexError: list index out of range ------------------------------+-------------------------- Reporter: aruminat@… | Owner: and.damore@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: py27-spatialite | ------------------------------+-------------------------- Comment (by Peter.Danecek@…): Note that there seem to be "updated" versions of py-spatialite available: https://pypi.python.org/pypi/pyspatialite. I understand that this port uses pyspatialite 2.6.2-spatialite.2.3.1, so maybe this might relevant here to cope with this problem. -- Ticket URL: <https://trac.macports.org/ticket/41411#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#41411: py27-spatialite: IndexError: list index out of range ------------------------------+-------------------------- Reporter: aruminat@… | Owner: and.damore@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: py27-spatialite | ------------------------------+-------------------------- Comment (by and.damore@…): The port has been silently updated to 3.0.1-alpha-0 in r114142, please check and see if you still have the issue. -- Ticket URL: <https://trac.macports.org/ticket/41411#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#41411: py27-spatialite: IndexError: list index out of range ------------------------------+-------------------------- Reporter: aruminat@… | Owner: and.damore@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: worksforme | Keywords: Port: py27-spatialite | ------------------------------+-------------------------- Changes (by and.damore@…): * status: new => closed * resolution: => worksforme -- Ticket URL: <https://trac.macports.org/ticket/41411#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts