Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting required package version number in bdist_rpm setup.cfg

Tags:

python

rpm

I am using Python's bdist_rpm to turn my Python code into rpm packages to be downloaded using yum.

My setup.cfg looks like this:

[bdist_rpm]
requires=python-flask,python-gevent,python-sqlalchemy

Whenever I try to set the version numbers, e.g. python-flask-0.10.1, python-flask=0.10.1, yum whinges that the packages need to be installed but doesn't install them itself, which makes me think I'm not correctly specifying the required packages.

So in a bdist_rpm setup.cfg, how do I set the version number of the package I require?

like image 909
David Poxon Avatar asked Dec 31 '25 23:12

David Poxon


1 Answers

You probably want to write something like that:

[bdist_rpm]
requires = python-flask = 0.10.1
    python-gevent
    python-sqlalchemy

After, you can verify if the specfile is correct:

python setup.py bdist_rpm --spec-only

You should have a line like:

Requires: python-flask = 0.10.1 python-gevent python-sqlalchemy

The trick here is that the space matter.

like image 91
wilfriedroset Avatar answered Jan 02 '26 16:01

wilfriedroset