Skip to content

Zope2 at "Downloading/unpacking zope.security" #190

Closed

Description

@devwithzachary

I am trying to build python-for-android with Zope2 by using the command:

./distribute.sh -m "openssl pil zope2"

and this fails with:

Getting distribution for 'zope.security==3.7.4'.
In file included from /home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/Python.h:58:0,
                 from src/zope/security/_proxy.c:19:
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
src/zope/security/_proxy.c: In function 'init_proxy':
src/zope/security/_proxy.c:1006:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   Py_INCREF(&SecurityProxyType);
   ^
error: Setup script exited with error: command 'arm-linux-androideabi-gcc' failed with exit status 1
An error occurred when trying to install zope.security 3.7.4. Look above this message for any errors that were output by easy_install.
While:
  Installing test.
  Getting distribution for 'zope.security==3.7.4'.
Error: Couldn't install: zope.security 3.7.4

To get to this point I used this recipe for zope2:

#!/bin/bash

VERSION_zope2=${VERSION_zope2:-2.13}
URL_zope2=https://github.com/zopefoundation/Zope/archive/$VERSION_zope2.zip
BUILD_zope2=$BUILD_PATH/zope2/$(get_directory $URL_zope2)
RECIPE_zope2=$RECIPES_PATH/zope2

function prebuild_zope2() {
    true
}

function build_zope2() {
    cd $BUILD_zope2

    push_arm

    export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
    export LDSHARED="$LIBLINK"
#    export PYTHONPATH="/home/marco/src/android/python-for-android/build/hostpython/Python-2.7.2/build/lib.linux-x86_64-2.7"

    HOSTPYTHON=/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/hostpython
    try $HOSTPYTHON bootstrap.py
    try bin/buildout

    unset LDSHARED
    pop_arm
}

function postbuild_zope2() {
    true
}

I had an issue with _ssl which I fixed by doing:

python-for-android/build/hostpython/Python-2.7.2/Lib ln -s ../build/lib.linux-x86_64-2.7 plat-linux3

Activity

  1. brousch commented on Dec 30, 2013

    @brousch
    Contributor

    When I run it I get a different error:

    Downloading/unpacking zope.security (from zope2)
    Using download cache from /home/brousch/.buildozer/cache/https%3A%2F%
    2Fpypi.python.org
    %2Fpackages%2Fsource%2Fz%2Fzope.security%2Fzope.security-4.0.0.tar.gz
    Running setup.py egg_info for package zope.security
    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
    Traceback (most recent call last):
    File "", line 16, in
    File
    "/home/brousch/Projects/playground/.buildozer/venv/build/zope.security/setup.py",
    line 162, in
    zip_safe = False,
    File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 221, in init
    self.fetch_build_eggs(attrs.pop('setup_requires'))
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 245, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 588, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 833, in best_match
    return self.obtain(req, installer) # try and download/install
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 845, in obtain
    return installer(requirement)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 295, in fetch_build_egg
    return cmd.easy_install(req)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 604, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 634, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 829, in install_eggs
    return self.build_and_install(setup_script, setup_base)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 1109, in build_and_install
    self.run_setup(setup_script, setup_base, args)
    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 1097, in run_setup
    raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error:
    command '/bin/false' failed with exit status 1
    Complete output from command python setup.py egg_info:
    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

    Traceback (most recent call last):

    File "", line 16, in

    File
    "/home/brousch/Projects/playground/.buildozer/venv/build/zope.security/setup.py",
    line 162, in

    zip_safe = False,
    

    File "/usr/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 221, in init

    self.fetch_build_eggs(attrs.pop('setup_requires'))
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 588, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 833, in best_match

    return self.obtain(req, installer) # try and download/install
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py",
    line 845, in obtain

    return installer(requirement)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/dist.py",
    line 295, in fetch_build_egg

    return cmd.easy_install(req)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 604, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 634, in install_item

    dists = self.install_eggs(spec, download, tmpdir)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 829, in install_eggs

    return self.build_and_install(setup_script, setup_base)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 1109, in build_and_install

    self.run_setup(setup_script, setup_base, args)
    

    File
    "/home/brousch/Projects/playground/.buildozer/venv/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py",
    line 1097, in run_setup

    raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    

    distutils.errors.DistutilsError: Setup script exited with error: command
    '/bin/false' failed with exit status 1


    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in
    /home/brousch/Projects/playground/.buildozer/venv/build/zope.security
    Storing complete log in /home/brousch/.pip/pip.log

    Command failed: pip-2.7 install

    --download-cache=/home/brousch/.buildozer/cache
    --target=/home/brousch/Projects/playground/.buildozer/applibs zope2

    On Mon, Dec 30, 2013 at 5:20 AM, Zachary Powell notifications@github.comwrote:

    I am trying to build python-for-android with Zope2 by using the command:

    ./distribute.sh -m "openssl pil zope2"

    and this fails with:

    Run pymodules install
    We want to install: zope2
    Check if and pip-2.7 are present
    Check if virtualenv is existing
    Installing virtualenv
    ./distribute.sh: line 93: --python=python2.7: command not found

    I have tried

    ./distribute.sh -m "openssl pil kivy"

    which works fine, so is there any issue with the zope2 recipe or my
    machine set up? or python-for-android.

    I will continue to investigate this myself but wanted to post a bug incase
    others have an insite into the issue.

    �
    Reply to this email directly or view it on GitHubhttps://github.com//issues/190
    .

    Ben Rousch
    brousch@gmail.com
    http://clusterbleep.net/

  2. snarky-snark commented on Jan 6, 2014

    @snarky-snark

    @zacthespack I think your error is due to the VIRTUALENV environment variable not being set. Try setting it to the location of your virtualenv binary (assuming it's already installed). For example, "export VIRTUALENV=/usr/bin/virtualenv".

  3. devwithzachary commented on Jan 6, 2014

    @devwithzachary
    Author

    @snarky-snark Thank you! this fixed my error however I am not hit with the same error as @brousch

  4. devwithzachary commented on Feb 10, 2014

    @devwithzachary
    Author

    I have made some progress please see first post for the current issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions