bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

PythonRecipe can't modify attributes #145

Open karnauskas opened 8 years ago

karnauskas commented 8 years ago

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

bernd commented 8 years ago

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

karnauskas commented 8 years ago

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?

tomeon commented 8 years ago

@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
brejoc commented 7 years ago

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.