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

extension _yaml is not built #179

Closed
dfroger opened this issue Jun 27, 2018 · 5 comments
Closed

extension _yaml is not built #179

dfroger opened this issue Jun 27, 2018 · 5 comments

Comments

@dfroger
Copy link

dfroger commented Jun 27, 2018

Trying to build the extension _yaml for pyyaml 4.1 on debian 8:

python setup.py build_ext

Fails with:

/home/dfroger/.pyenv/versions/3.6.2/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
running build_ext
building '_yaml' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/ext
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/dfroger/.pyenv/versions/3.6.2/include/python3.6m -c ext/_yaml.c -o build/temp.linux-x86_64-3.6/ext/_yaml.o
gcc: error: ext/_yaml.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Error compiling module, falling back to pure Python

Note that directory build/temp.linux-x86_64-3.6/ext is empty.

@dfroger
Copy link
Author

dfroger commented Jun 27, 2018

When cython is installed, building the extension works.

@dfroger
Copy link
Author

dfroger commented Jun 27, 2018

Actually, I still have a question:

python -m venv venv3.12
./venv3.12/bin/pip install pyyaml==3.12

python -m venv venv4.1
./venv4.1/bin/pip install pyyaml==4.1

find . -name '_yaml*'
./venv3.12/lib/python3.6/site-packages/_yaml.cpython-36m-x86_64-linux-gnu.so

why with 3.12, the extension was built, but not in 4.1?

Edit: In both cases, I didn't had cython installed.

@dfroger
Copy link
Author

dfroger commented Jun 27, 2018

The problem is that in https://pypi.org/simple/pyyaml/ PyYAML-3.12.tar.gz contains ext/_yaml.c, but PyYAML-4.1.tar.gz do not, so cython is required for 4.1 to build the extension. (.pyx -> .c)

@sigmavirus24 could you make a 4.1 tarball that contains ext/_yaml.c, or would you accept a PR on that?

@ingydotnet
Copy link
Member

I'll look into this as soon as our issues around building wheels are resolved.

The-Compiler added a commit to qutebrowser/qutebrowser that referenced this issue Jun 28, 2018
This reverts commit 96defc5.

With PyYAML 4.1 we don't have C extensions on Travis CI:
yaml/pyyaml#179
yaml/pyyaml#182

Unfortunately, cython isn't in the APT whitelist either:
travis-ci/apt-source-safelist#37
@ingydotnet
Copy link
Member

FYI PyYAML release 4.1 was retracted but this has already been fixed in 4.2b1 by applying #188

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