Open seiferteric opened 9 years ago
You can override the name and dependencies with flags. Probably also have to disable auto dependencies. Not fun, but addresses the problem.
See pypa/setuptools#1597
One workaround is to use unsafe_name
instead of project_name
in get_metadata.py
WARNING! This works for me. You should double check this. I guess that FPM is also doing some sanity checks to names, but… I don't know every case.
So is there any fix or workaround for this 6-year-old problem?
We have a setup where we build packages with normal hyphens (-
) in the canonical name. For example, we build a package called importlib-metadata
which refers to https://pypi.org/project/importlib-metadata/
, however the output RPM is called importlib_metadata
, while other RPMs that depend on this package, refer to importlib-metadata
.
All I need is for the output RPMs to use the package name as I enter it, instead of converting -
to _
. How do I proceed, without hacking FPM core files?
$ fpm -s python --python-package-name-prefix python36 --python-bin python3.6 --python-install-lib /usr/lib/python3.6/site-packages --python-install-bin /usr/bin --python-scripts-executable /usr/bin/python3.6 --python-install-data /usr/lib/python3.6/site-packages -t rpm --rpm-os linux importlib-metadata==3.4.0
Created package {:path=>"python36-importlib_metadata-3.4.0-1.noarch.rpm"}
My workaround for this is passing the module names from the dependency json in fpm --verbose
output as --name
for the dependency packages.
Note that prefix is ignored, so you’d provide the full package name.
e.g. fpm ... --name python3-importlib-metadata importlib-metadata
I am creating an rpm from a python package. It has python dependencies for which I am also building rpms for. Some of the dependencies I am having problems with are ndg_httpsclient and service-identity.
With ndg_httpsclient I get: python-ndg_httpsclient-0.4.0-1.noarch.rpm, but my rpm depends on python-ndg-httpsclient, not python-ndg_httpsclient.
Same issue with service-identity, I get python-service_identity-14.0.0-1.x86_64.rpm, but I depend on python-service-identity.