Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiwisolver build fails on TravisCI #6

Closed
brett-patterson opened this issue Jun 27, 2014 · 3 comments
Closed

kiwisolver build fails on TravisCI #6

brett-patterson opened this issue Jun 27, 2014 · 3 comments

Comments

@brett-patterson
Copy link

The TravisCI build fails when trying to install kiwisolver with the following error:

Searching for kiwisolver

Reading https://pypi.python.org/simple/kiwisolver/

Best match: kiwisolver 0.1.2

Downloading https://pypi.python.org/packages/source/k/kiwisolver/kiwisolver-0.1.2.zip#md5=33ebf7f5b90d8ff05f31850d6127ddde

Processing kiwisolver-0.1.2.zip

Writing /tmp/easy_install-CN0qs5/kiwisolver-0.1.2/setup.cfg

Running kiwisolver-0.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-CN0qs5/kiwisolver-0.1.2/egg-dist-tmp-CnHX9L

warning: no previously-included files found matching 'build.py'

error: Setup script exited with error: SandboxViolation: os.open('/tmp/tmpWHRYWb/ZyaJNy', 131266, 384) {}

The package setup script has attempted to modify files on your system

that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not

support alternate installation locations even if you run its setup

script by hand. Please inform the package's author and the EasyInstall

maintainers to find out if a fix or workaround is available.

The command "python setup.py develop" failed and exited with 1 during .

Your build has been stopped.

Any ideas why it's trying to access /tmp/ or how to fix?

@sccolbert
Copy link
Member

You can't easy-install kiwi without running the build.py script first. This is because python's manifest file has concept of relative ancestor directories. This means that all of the C++ headers have to be copied into the Python directory first.

The easiest way to build kiwi is to run:

python build.py [build|develop|install]

which will copy the right files and then invoke setup.py

@sccolbert
Copy link
Member

I'm open to suggestions/improvements on the setup script.

@jwiggins
Copy link
Contributor

This is working for me (with setup.py in the repo root):

ext_modules = [
    Extension(
        'kiwisolver',
        ['py/kiwisolver.cpp',
         'py/constraint.cpp',
         'py/expression.cpp',
         'py/solver.cpp',
         'py/strength.cpp',
         'py/term.cpp',
         'py/variable.cpp'],
        include_dirs=['.', 'kiwi', 'py'],
        language='c++',
    ),
]

And the MANIFEST.in looks like this:

include MANIFEST.in
include COPYING.txt
include README.rst
include releasenotes.rst
recursive-include kiwi *.h
recursive-include py *.cpp *.h

PR submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants