Opened 8 months ago

Closed 8 months ago

#6853 enhancement closed duplicate (duplicate)

Twisted source install should have option to skip extensions building

Reported by: oberstet Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

I am installing Twisted from source on a Arduino Yun (a small Linux powered MIPS-based platform). There is no GCC. And I'd rather avoid to go through the pain of setting up a cross-compile toolchain.

This is what I tried:

root@Arduino:/opt/build/Twisted-13.2.0# /opt/python/bin/python setup.py build_py build_scripts install --skip-build
 
...
 
copying bin/conch/conch -> build/scripts-2.7
copying bin/conch/tkconch -> build/scripts-2.7
copying bin/conch/cftp -> build/scripts-2.7
copying bin/conch/ckeygen -> build/scripts-2.7
running install
running bdist_egg
installing library code to build/bdist.linux-mips/egg
running install_lib
running build_ext
mips-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
building 'twisted.test.raiser' extension
creating build/temp.linux-mips-2.7
creating build/temp.linux-mips-2.7/twisted
creating build/temp.linux-mips-2.7/twisted/test
mips-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -I/usr/include/python2.7 -c twisted/test/raiser.c -o build/temp.linux-mips-2.7/twisted/test/raiser.o
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1

Now, what did work was commenting the line conditionalExtensions=getExtensions(), in setup.py.

Well, I can do that, no problem. But I'd like to write a recipe for people to get started with Twisted on the Arduino Yun. And it would be nice if users didn't need to fiddle with "commenting lines" in source files to get going.

So, what about having a command line switch that skips extensions building?

Change History (3)

comment:1 Changed 8 months ago by oberstet

Should someone wonder: installing via easy_install from PyPI will fail also on this system (same reason .. lack of installed GCC .. and this system does not have GCC as a package in their repo .. it is expected that you cross-compile - http://download.linino.org/dogstick/all-in-one/latest/packages/):

root@Arduino:/opt# /opt/python/bin/easy_install twisted
Searching for twisted
Reading https://pypi.python.org/simple/twisted/
Best match: Twisted 13.2.0
Downloading https://pypi.python.org/packages/source/T/Twisted/Twisted-13.2.0.tar.bz2#md5=83fe6c0c911cc1602dbffb036be0ba79
Processing Twisted-13.2.0.tar.bz2
Writing /tmp/easy_install-d6jchi/Twisted-13.2.0/setup.cfg
Running Twisted-13.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-d6jchi/Twisted-13.2.0/egg-dist-tmp-QXap2a
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
error: Setup script exited with error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1

comment:2 Changed 8 months ago by oberstet

zope.interface seems to cope with the lack of GCC:

root@Arduino:/opt# /opt/python/bin/easy_install zope.interface
Searching for zope.interface
Reading https://pypi.python.org/simple/zope.interface/
Best match: zope.interface 4.0.5
Downloading https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.0.5.zip#md5=caf26025ae1b02da124a58340e423dfe
Processing zope.interface-4.0.5.zip
Writing /tmp/easy_install-f5Gg6r/zope.interface-4.0.5/setup.cfg
Running zope.interface-4.0.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-f5Gg6r/zope.interface-4.0.5/egg-dist-tmp-g5G1dx
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
********************************************************************************
WARNING:

        An optional code optimization (C extension) could not be compiled.

        Optimizations for this package will not be available!
()
command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1
********************************************************************************

Adding zope.interface 4.0.5 to easy-install.pth file

Installed /opt/python/lib/python2.7/site-packages/zope.interface-4.0.5-py2.7-linux-mips.egg
Processing dependencies for zope.interface
Finished processing dependencies for zope.interface
root@Arduino:/opt#

comment:3 Changed 8 months ago by exarkun

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #3586.

Note: See TracTickets for help on using tickets.