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

Failure to find osx-64 python.app during build test #1664

Closed
rayosborn opened this issue Jan 16, 2017 · 6 comments · Fixed by #1669
Closed

Failure to find osx-64 python.app during build test #1664

rayosborn opened this issue Jan 16, 2017 · 6 comments · Fixed by #1669
Labels
locked [bot] locked due to inactivity
Milestone

Comments

@rayosborn
Copy link

rayosborn commented Jan 16, 2017

I am submitting this as a new issue, although it is clearly related to #7, because this has just become a problem for my builds (https://github.com/nexpy/nexpy/blob/master/conda-recipe/meta.yaml but without commenting out the osx_is_app line), although they seemed to work fine a few months ago.

Current conda install

              platform : osx-64
          conda version : 4.3.4
       conda is private : False
      conda-env version : 4.3.4
    conda-build version : 2.1.1
         python version : 2.7.12.final.0
       requests version : 2.12.4
       root environment : /Users/rosborn/anaconda  (writable)
    default environment : /Users/rosborn/anaconda
       envs directories : /Users/rosborn/anaconda/envs
          package cache : /Users/rosborn/anaconda/pkgs
           channel URLs : https://conda.anaconda.org/conda-canary/osx-64
                          https://conda.anaconda.org/conda-canary/noarch
                          https://conda.anaconda.org/nexpy/osx-64
                          https://conda.anaconda.org/nexpy/noarch
                          https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /Users/rosborn/.condarc
           offline mode : False
             user-agent : conda/4.3.4 requests/2.12.4 CPython/2.7.12 Darwin/15.6.0 OSX/10.11.6
                UID:GID : 938267710:660979062
  

The error is in running the test at the end, even though pythonw is installed in the test's bin directory.
Error message

+ /bin/bash -x -e /Users/rosborn/anaconda/conda-bld/conda-recipe_1484588846841/test_tmp/run_test.sh
+ nexpy --help
/bin/bash: /Users/rosborn/anaconda/conda-bld/conda-recipe_1484588846841/_t_env/bin/python.app: No such file or directory
  

It looks to me as if the problem is that the code in post.py (https://github.com/conda/conda-build/blob/master/conda_build/post.py) tries to run python.app, but doesn't have pythonw as a fallback option if it's not there.
@msarahan msarahan added this to the 2.1.2 milestone Jan 17, 2017
@msarahan
Copy link
Contributor

I'm not actually sure that we can have fallbacks there - that's the shebang that is saying which executable to run. I can certainly try to use pythonw on MacOS there rather than python.app, but I'm not sure exactly what the consequences of that are. I think the key issue is that we need some way of distinguishing GUI-enabled programs from CLI-only programs. If pythonw does not mess up CLI-only apps, then that is probably the best way forward.

@rayosborn
Copy link
Author

I thought it would be possible to check if either python.app or pythonw exist within the bin directory before writing the shebang. It is only failing on the final test in a temporary environment that is deleted straight after the test, so it doesn't have to be particularly robust.

@msarahan
Copy link
Contributor

Both python.app and pythonw come from the same package - the python.app package. In fact, it appears that pythonw is nothing more than a link to python.app. If one is missing, I would expect both to be missing.

I'm lost as to why we separate python.app and pythonw from the base python package. We don't do that on Windows. @ilanschnell can you comment on this discrepancy?

@ilanschnell
Copy link
Contributor

Indeed pythonw and python.app are the same file. The separation into the Mac OS X python.app conda package is done for (i) separation of concerns and (ii) historical reasons.

@rayosborn
Copy link
Author

I haven't had time to test the #1669 yet, but it looks as if it would work. My pythonw file contains

#!/bin/bash
export PYTHONEXECUTABLE=/Users/rosborn/anaconda/bin/python
/Users/rosborn/anaconda/python.app/Contents/MacOS/python "$@"

so it looks as if the problem is that, in post.py, the file path to python.app assumed it was in the bin directory, whereas, at least in my case, it is in the parent anaconda directory.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants