Conan: [question] why isn't python requires updated with --update?

Created on 2 Mar 2019  路  3Comments  路  Source: conan-io/conan

To help us debug your issue please explain:

  • [x] I've read the CONTRIBUTING guide.
  • [x] I've specified the Conan version, operating system version and any tool that can be relevant.
  • [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
Conan Version 1.12.2
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

I see from documentation at:
https://docs.conan.io/en/latest/extending/python_requires.html

That python_requires are not updated with --update
They are not automatically updated with the --update argument from remotes.

But why? Every time I update the python_requires I need to inform all users to clear their cache for those packages to be updated? Seems very cumbersome.

Most helpful comment

The main reason was that due to the "inversion of control" that is necessary to process python-requires, passing user information to the resolution of python-requires was quite ugly.

The architecture has improved a little bit, so I think it is possible, adding self.update and self.check_updates to ConanPythonRequires, I'll submit a draft PR, to be considered for 1.14

All 3 comments

The main reason was that due to the "inversion of control" that is necessary to process python-requires, passing user information to the resolution of python-requires was quite ugly.

The architecture has improved a little bit, so I think it is possible, adding self.update and self.check_updates to ConanPythonRequires, I'll submit a draft PR, to be considered for 1.14

Implemented. This will be released in next Conan 1.14.
Thanks for raising this issue!

@memsharded This is still not functioning. conan version 1.15.1

I'm using python requires in the manner described here:
https://docs.conan.io/en/latest/extending/python_requires.html#python-requires-reusing-code-experimental

I'm defining base ConanFile recipes, which works great!

In my downstream conanfiles:

common = python_requires('ConanRecipes/[>=0.1.0-0, include_prerelease=True]@mh/testing')

class ThisIsAPackage(common.BaseRecipe):

However, it still does not get updated with --update
I have to remove the ConanRecipes locally to get latest version.

conan remove ConanRecipes* -f

Then it downloads the latest one.

Was this page helpful?
0 / 5 - 0 ratings