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

Source distribution doesn't contain all the source files #70

Closed
luizribeiro opened this issue Sep 13, 2020 · 3 comments
Closed

Source distribution doesn't contain all the source files #70

luizribeiro opened this issue Sep 13, 2020 · 3 comments

Comments

@luizribeiro
Copy link

piwheels hasn't been able to build pynng successfully. After reporting it to them on piwheels/packages/issues/160 today, they mentioned that the setup.py for pynng is doing a git clone - which seems to be an anti-pattern.

Could this be fixed?

These are the errors I get while building:

Command ['/home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/bin/pip', 'install', '--no-deps', 'pynng==0.6.1'] errored with the following return code 1, and output:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pynng==0.6.1
  Using cached https://files.pythonhosted.org/packages/97/c5/ecfc62f3e9f474861a15793d3a64febad5b471b1aa874509f9eaf2f25e19/pynng-0.6.1.tar.gz
Building wheels for collected packages: pynng
  Running setup.py bdist_wheel for pynng: started
  Running setup.py bdist_wheel for pynng: finished with status 'error'
  Complete output from command /home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ql6suzs/pynng/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-ojgtxetk
 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pynng
  Running setup.py clean for pynng
Failed to build pynng
Installing collected packages: pynng
  Running setup.py install for pynng: started
    Running setup.py install for pynng: still running...
    Running setup.py install for pynng: finished with status 'error'
    Complete output from command /home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ql6suzs/pynng/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-record-ih9
rm080/install-record.txt --single-version-externally-managed --compile --install-headers /home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/include/site/python3.7/pynng:
    running install
    running build
    running build_py
    Cloning into 'mbedtls'...
    Checking out files: 100% (1221/1221), done.
    Note: checking out '04a049bda1ceca48060b57bc4bcf5203ce591421'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

      git checkout -b <new-branch-name>

    HEAD is now at 04a049bda Merge remote-tracking branch 'origin/pr/2823' into mbedtls-2.16
    building mbedtls with: ['cmake', '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true', '-DENABLE_PROGRAMS=OFF', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=../prefix', '..']
    error: [Errno 2] No such file or directory: 'cmake': 'cmake'

    ----------------------------------------                                                                                                                                                                                                                                                                                                                             Command "/home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8ql6suzs/pynng/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-record-ih9rm080/install-record.txt
 --single-version-externally-managed --compile --install-headers /home/luiz/.cache/pypoetry/virtualenvs/workbench-ZfPqJ4Rm-py3.7/include/site/python3.7/pynng" failed with error code 1 in /tmp/pip-install-8ql6suzs/pynng/
@codypiersall
Copy link
Owner

Thanks for opening an issue here!

It looks like I forgot to add the mbedtls source to the source distribution. I can and will fix that; it should be possible to build everything from just a source release.

However, that doesn't look like what the issue is to me; I'll comment on the linked issue.

@codypiersall codypiersall changed the title Can't build from source on raspberry pi Source distribution doesn't contain all the source files Sep 14, 2020
@codypiersall
Copy link
Owner

I just cut a new source release, 0.6.2., which should fix this issue. I'll close this issue once we actually get a wheel built on piwheels.

@codypiersall
Copy link
Owner

0.6.2 does fix it, and the wheel for the Raspberry Pi is building successfully: https://www.piwheels.org/project/pynng/

#69 is still causing issues for Python 3.5, but that's a separate issue.

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

2 participants