fpm icon indicating copy to clipboard operation
fpm copied to clipboard

pip3 21.3 deprecated --build-dir (and aliases, eg. --build)

Open philschwartzsonos opened this issue 3 years ago • 2 comments

from https://pip.pypa.io/en/stable/news/:

Remove the --build-dir option and aliases, one last time. (#10485)

$ pip3 --version pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

$ fpm -s python -t deb --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 --python-install-lib=/usr/lib/python3/dist-packages --python-install-bin=/usr/bin --deb-no-default-config-files --verbose flask

fpm ultimately attempts to run the following command when using -s python:

$ pip3 download --no-clean --no-deps --no-binary :all: -i https://pypi.python.org/simple --build /tmp/package-python-build-ca294820df13179a5615a2cfb5e98006916ac6b54d90323c649d9b3cd190/flask flask

Usage:
pip3 download [options] [package-index-options] ... pip3 download [options] -r [package-index-options] ... pip3 download [options] ... pip3 download [options] ... pip3 download [options] <archive url/path> ...

no such option: --build

philschwartzsonos avatar Jul 12 '22 14:07 philschwartzsonos

I merged a fix for this but haven’t yet had energy to do an fpm release. Sorry for the delays.

https://github.com/jordansissel/fpm/pull/1896

jordansissel avatar Jul 12 '22 15:07 jordansissel

Awesome, thanks Jordan! I patched fpm-1.13.1 with the python.rb in the commit you mentioned and things are working fine now.

FWIW, I've successfully built about 30 pip3 packages with fpm using the patch and haven't had it fail yet so looks like your assumptions at least handle most cases. Some of these pkgs include names with capital first-letters and/or contain embedded hyphens.

philschwartzsonos avatar Jul 12 '22 18:07 philschwartzsonos

fpm 1.15.0 is released and contains this improvement.

jordansissel avatar Nov 15 '22 16:11 jordansissel