fpm-cookery icon indicating copy to clipboard operation
fpm-cookery copied to clipboard

PythonRecipe can't modify attributes

Open karnauskas opened this issue 9 years ago • 4 comments

I'm trying to generate rpm package from Python module but I can't modify auto generated dependencies.

karnauskas avatar Dec 29 '15 18:12 karnauskas

Can you show me an example recipe and describe the problem you have in more detail? Thanks!

bernd avatar Apr 02 '16 11:04 bernd

Eg I have something like this:

class Ansible < FPM::Cookery::PythonRecipe
    name "ansible"
    version "2.0.1.0"
end

Which will generate rpm where it depends on following:

rpm -qp --requires ./pkg/python-ansible-2.0.1.0-1.noarch.rpm 
python-jinja2
python-paramiko
python-pycrypto >= 2.6
python-pyyaml
python-setuptools
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

On distribution I have package "python-crypto" which is pretty much as the the one "python-pycrypto".

How to modify dependencies that generated package would depend on python-crypto but not on python-pycrypto?

karnauskas avatar Apr 13 '16 21:04 karnauskas

@nkts -- might not be what you want, as it means you'll have to specify all dependencies yourself, but maybe:

class Ansible < FPM::Cookery::PythonRecipe
  name "ansible"
  version "2.0.1.0"
  fpm_attributes :no_auto_depends? => true
end

tomeon avatar Aug 14 '16 11:08 tomeon

This issue is a bit old, but anyway. There is no other way to do that. Ansible needs to define dependencies with package names used on pypi. This can differ from the package names used in the distributions. This is why you have to provide the dependencies yourself in that case.

brejoc avatar Apr 12 '17 20:04 brejoc