Conan should let my recipe inherit its package name and version #5340
To help us debug your issue please explain:
My recipe wants to inherit its package name and version from a class that knows how to get them, but Conan refuses to create the package because (I believe) it uses
# test.py from conans import ConanFile class Foo: name = 'foo' version = '1.2.3' class Recipe(Foo, ConanFile): pass
I shouldn't have to do this.
# fixed.py from conans import ConanFile class Foo: name = 'foo' version = '1.2.3' class Recipe(Foo, ConanFile): name = Foo.name version = Foo.version
This has a reason: inheriting automatically the name and version of a base class was very confusing and problematic, because the main case of inheriting a base class is via
I think allowing this would be breaking behavior for those users and cannot be changed, unless until the python-requires issue (#4635) has been addressed (and no earlier than Conan 2.0, to be able to change this)