New issue 2496: Installing C-extensions with pypy3.5 on ubuntu
https://bitbucket.org/pypy/pypy/issues/2496/installing-c-extensions-with-pypy35-on

Konstantin Lopuhin:

I tried a couple of C extensions on the latest pypy3.5 nighly on Ubuntu 16.04, 
but they all fail with "Python.h: No such file or directory" error.

I used this 
http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-90688-27474b4d14e4-linux64.tar.bz2
 nightly build and then:
```
$ ./pypy-c-jit-90688-27474b4d14e4-linux64/bin/pypy3 -m venv ~/tmp/pypy3venv
$ . ~/tmp/pypy3venv/bin/activate
$ pip install pip -U
$ pip install Pillow
Collecting Pillow                                                               
                                                                                
       [431/449]
  Using cached Pillow-4.0.0.tar.gz
Collecting olefile (from Pillow)
  Using cached olefile-0.44.zip
Installing collected packages: olefile, Pillow
  Running setup.py install for olefile ... done
  Running setup.py install for Pillow ... error
    Complete output from command /home/kostia/tmp/pypy3venv/bin/pypy3 -u -c 
"import setuptools, 
tokenize;__file__='/tmp/pip-build-t3y_01z1/Pillow/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/tmp/pip-niggd2sb-record/install-record.txt --sing
le-version-externally-managed --compile --install-headers 
/home/kostia/tmp/pypy3venv/include/site/python3.5/Pillow:
    Single threaded build for pypy3
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageChops.py -> build/lib.linux-x86_64-3.5/PIL
    ... skipped ... 
    copying PIL/ImageWin.py -> build/lib.linux-x86_64-3.5/PIL
    running egg_info
    writing Pillow.egg-info/PKG-INFO
    writing dependency_links to Pillow.egg-info/dependency_links.txt
    writing requirements to Pillow.egg-info/requires.txt
    writing top-level names to Pillow.egg-info/top_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.sh'
    no previously-included directories found matching 'docs/_static'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.landscape.yaml'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching 'build_children.sh'
    warning: no previously-included files found matching 'tox.ini'
    warning: no previously-included files matching '.git*' found anywhere in 
distribution
    warning: no previously-included files matching '*.pyc' found anywhere in 
distribution
    warning: no previously-included files matching '*.so' found anywhere in 
distribution
    writing manifest file 'Pillow.egg-info/SOURCES.txt'
    running build_ext
    building 'PIL._imaging' extension
    creating build/temp.linux-x86_64-3.5/libImaging
    gcc -pthread -DNDEBUG -O2 -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF 
-I/usr/include/freetype2 -I/tmp/pip-build-t3y_01z1/Pillow/libImaging 
-I/home/kostia/tmp/pypy3venv/
include -I/usr/local/include -I/usr/include 
-I/home/kostia/tmp/pypy3venv/include -I/home/kostia/tmp/pypy3venv/include 
-I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/tem
p.linux-x86_64-3.5/_imaging.o
    _imaging.c:76:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/kostia/tmp/pypy3venv/bin/pypy3 -u -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-t3y_01z1/Pillow/setup.py';f=getattr(tokenize, 
'open', open)(__file__);
code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 
'exec'))" install --record /tmp/pip-niggd2sb-record/install-record.txt 
--single-version-externally-ma
naged --compile --install-headers 
/home/kostia/tmp/pypy3venv/include/site/python3.5/Pillow" failed with error 
code 1 in /tmp/pip-build-t3y_01z1/Pillow/
```

``pip install Pillow`` works for me on ``pypy2-v5.6.0``.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to