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)
Change History (7)
Changed 3 years ago by dershow
comment:1 Changed 3 years ago by kencu (Ken)
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: | new → assigned |
Summary: | py27-gdal fails to upgrade → py27-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 follow-up: 5 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 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: | assigned → closed |
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>