[MacPorts] #54897: py35-cython fails to build in trace mode due to missing dependency on py35-setuptools

MacPorts noreply at macports.org
Mon Sep 25 13:08:15 UTC 2017


#54897: py35-cython fails to build in trace mode due to missing dependency on
py35-setuptools
------------------------+-------------------------
 Reporter:  neverpanic  |      Owner:  stromnov
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.4.99
 Keywords:              |       Port:  py35-cython
------------------------+-------------------------
 Upgrading to py35-cython 0.27 fails in the build phase due to what is
 apparently a missing dependency on py35-setuptools.

 The relevant part from the log is:
 {{{
 :info:build running build_ext
 :info:build Unable to find pgen, not compiling formal grammar.
 :info:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py:261:
 UserWarning: Unknown distribution option: 'entry_points'
 :info:build   warnings.warn(msg)
 :info:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py:261:
 UserWarning: Unknown distribution option: 'zip_safe'
 :info:build   warnings.warn(msg)
 :info:build Traceback (most recent call last):
 :info:build   File "setup.py", line 278, in <module>
 :info:build     **setup_args
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py",
 line 148, in setup
 :info:build     dist.run_commands()
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py",
 line 955, in run_commands
 :info:build     self.run_command(cmd)
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py",
 line 974, in run_command
 :info:build     cmd_obj.run()
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build.py",
 line 135, in run
 :info:build     self.run_command(cmd_name)
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py",
 line 313, in run_command
 :info:build     self.distribution.run_command(command)
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py",
 line 973, in run_command
 :info:build     cmd_obj.ensure_finalized()
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py",
 line 107, in ensure_finalized
 :info:build     self.finalize_options()
 :info:build   File "/opt/local/var/macports/build/_opt_dports_python_py-
 cython/py35-cython/work/Cython-0.27/Cython/Distutils/build_ext.py", line
 19, in finalize_options
 :info:build     self.distribution.ext_modules)
 :info:build   File "/opt/local/var/macports/build/_opt_dports_python_py-
 cython/py35-cython/work/Cython-0.27/Cython/Build/Dependencies.py", line
 915, in cythonize
 :info:build     aliases=aliases)
 :info:build   File "/opt/local/var/macports/build/_opt_dports_python_py-
 cython/py35-cython/work/Cython-0.27/Cython/Build/Dependencies.py", line
 758, in create_extension_list
 :info:build     Extension_distutils =
 sys.modules['setuptools.extension']._Extension
 :info:build KeyError: 'setuptools.extension'
 :info:build Command failed:  cd "/opt/local/var/macports/build
 /_opt_dports_python_py-cython/py35-cython/work/Cython-0.27" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
 setup.py --no-user-cfg build
 :info:build Exit code: 1
 :warn:build The following existing files were hidden from the build system
 by trace mode:
 :msg:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5
 /site-packages/setuptools/__init__.py
 :msg:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5
 /site-packages/setuptools/command/__init__.py
 :error:build Failed to build py35-cython: command execution failed
 :debug:build Error code: CHILDSTATUS 48691 1
 :debug:build Backtrace: command execution failed
 :debug:build     while executing
 :debug:build "system {*}$notty {*}$nice $fullcmdstring"
 :debug:build     invoked from within
 :debug:build "command_exec 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_dports_python_py-
 cython/py35-cython/main.log for details.
 }}}

 I'm also attaching the complete logfile.

 Adding the dependency fixes the build. Here's a patch:

 {{{
 #!patch
 diff --git a/python/py-cython/Portfile b/python/py-cython/Portfile
 index 3692ab1c91..374df826fa 100644
 --- a/python/py-cython/Portfile
 +++ b/python/py-cython/Portfile
 @@ -31,6 +31,7 @@ checksums           rmd160
 2fb0fdbb56c3b4000e4d1c7b510c98e2fa606585 \
                      sha256
 b932b5194e87a8b853d493dc1b46e38632d6846a86f55b8346eb9c6ec3bdc00b

  if {${name} ne ${subport}} {
 +    depends_build       port:py${python.version}-setuptools
      depends_run         port:cython_select
      test.run            no
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54897>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list