Opened 3 years ago

Closed 3 years ago

#63000 closed defect (fixed)

py27-gdal fails to build: 'encoding' is an invalid keyword argument for this function

Reported by: dershow Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Veence (Vincent)
Port: py-gdal

Description

I'm trying to upgrade py-gdal from 3.2.1_0 to 3.3.0_0 and it fails. I did just upgrade the gdal port from 3.2.2_1 to 3.3.0_0 which might be related.

Here's the end of the log file:

:debug:build SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-gdal/py27-gdal/work/GDAL-3.3.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-gdal/py27-gdal/work/GDAL-3.3.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
:info:build Traceback (most recent call last):
:info:build   File "setup.py", line 350, in <module>
:info:build     readme = open('README.rst', encoding="utf-8").read()
:info:build TypeError: 'encoding' is an invalid keyword argument for this function
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-gdal/py27-gdal/work/GDAL-3.3.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
:info:build Exit code: 1
:error:build Failed to build py27-gdal: command execution failed
:debug:build Error code: CHILDSTATUS 59139 1
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-gdal/py27-gdal/main.log for details.

Full log file is attached.

Attachments (1)

main.log (14.8 KB) - added by dershow 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by dershow

Attachment: main.log added

comment:1 Changed 3 years ago by kencu (Ken)

I don't code in python, but it would appear possible that the open with encoding feature might only be available in a python 3.x version.

<https://docs.python.org/3/library/functions.html#open>

comment:2 Changed 3 years ago by jmroot (Joshua Root)

Cc: petrrr removed
Owner: set to petrrr
Port: py-gdal added; py27-gdal removed
Status: newassigned
Summary: py27-gdal fails to upgradepy27-gdal fails to build: 'encoding' is an invalid keyword argument for this function

comment:3 Changed 3 years ago by reneeotten (Renee Otten)

Cc: Veence added

according to upstream, version 3.3.0 supports only Python 3.6+ - so that explains the failure for PY27. The PY27 subport should have been pinned to the latest supported version in this commit.

comment:4 Changed 3 years ago by Veence (Vincent)

Oops. Didn't checked that. I suppose it’s easy enough to alter the Portfile to specifically revert py27-gdal to the previous version.

comment:5 in reply to:  4 Changed 3 years ago by reneeotten (Renee Otten)

Replying to Veence:

Oops. Didn't checked that. I suppose it’s easy enough to alter the Portfile to specifically revert py27-gdal to the previous version.

sure, please do that

comment:6 Changed 3 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 630441a27a696eba28bfc1d3c2ca52e83cb5a9c3/macports-ports (master):

py-gdal: pin py27/py35 subports to latest version

Closes: #63000

Note: See TracTickets for help on using tickets.