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

Python3 + PyYaml conflict #1031

Closed
mixmastamyk opened this issue Apr 1, 2017 · 5 comments
Closed

Python3 + PyYaml conflict #1031

mixmastamyk opened this issue Apr 1, 2017 · 5 comments

Comments

@mixmastamyk
Copy link
Contributor

mixmastamyk commented Apr 1, 2017

Hi,

I have a python3 kivy project and found a yaml recipe at github. But when it is added to my requirements line in the .spec file, it complains that it is forcing python2 because of it depending on setuptools.

I'm guessing setuptools can be removed on python3?

[INFO]:    Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']
[INFO]:    Picking the latest gcc toolchain, here 5
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]
[INFO]:    Loaded recipe sdl2 (depends on [('python2', 'python3crystax'), 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe pyyaml (depends on [('python2', 'python3crystax'), 'setuptools'])
[INFO]:    Loaded recipe python3crystax (depends on ['hostpython3crystax'], conflicts ['python2', 'python3'])
[INFO]:    Loaded recipe kivy (depends on ['pyjnius', ('sdl2', 'pygame'), ('python2', 'python3crystax')])
[INFO]:    Loaded recipe sdl2_image (depends on [])
[INFO]:    Loaded recipe sdl2_mixer (depends on [])
[INFO]:    Loaded recipe sdl2_ttf (depends on [])
[INFO]:    Loaded recipe setuptools (depends on ['python2'])
[INFO]:    Loaded recipe hostpython3crystax (depends on [], conflicts ['hostpython2'])
[INFO]:    Loaded recipe pyjnius (depends on ['six', ('sdl2', 'sdl', 'genericndkbuild'), ('python2', 'python3crystax')])
[INFO]:    Loaded recipe python2 (depends on ['hostpython2'], conflicts ['python3crystax', 'python3'])
[WARNING]: python2 conflicts with python3crystax, but both have been included or pulled into the requirements.
@inclement
Copy link
Member

inclement commented Apr 1, 2017

This happens because the setuptools recipe has only python2 as a requirement. As far as I remember, there's no need for this and it would be fine to add python3crystax as an alternative. If you could check that this works, a PR to fix it would be welcome.

@mixmastamyk
Copy link
Contributor Author

Changed to this:

depends = [ ('python2', 'python3crystax') ]

Received this:

   [INFO]:    Building setuptools for armeabi-v7a
[INFO]:    setuptools apparently isn't already in site-packages
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File ".../reqs/python-for-android/pythonforandroid/toolchain.py", line 903, in <module>
    main()
  File ".../reqs/python-for-android/pythonforandroid/toolchain.py", line 900, in main
    ToolchainCL()
  File ".../reqs/python-for-android/pythonforandroid/toolchain.py", line 508, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File ".../reqs/python-for-android/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File ".../reqs/python-for-android/pythonforandroid/toolchain.py", line 190, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 564, in build_recipes
    recipe.build_arch(arch)
  File "pythonforandroid/recipe.py", line 806, in build_arch
    self.install_python_package(arch)
  File "pythonforandroid/recipe.py", line 815, in install_python_package
    env = self.get_recipe_env(arch)
  File "pythonforandroid/recipe.py", line 786, in get_recipe_env
    hppath += [join(builddir, d) for d in listdir(builddir)
OSError: [Errno 2] No such file or directory: 'build'

@inclement
Copy link
Member

inclement commented Apr 1, 2017

Some of the earlier log output should describe which recipes are being required and why.

@mixmastamyk
Copy link
Contributor Author

Made a pull request in support of this: #1031

@inclement
Copy link
Member

Closing as the pyyaml recipe was replaced.

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