redacted / XKCD-password-generator

Generate secure multiword passwords/passphrases, inspired by XKCD
BSD 3-Clause "New" or "Revised" License
1.32k stars 185 forks source link

DEPRECATION: xkcdpass is being installed using the legacy 'setup.py install' method #160

Open Sylvain303 opened 10 months ago

Sylvain303 commented 10 months ago

Hello,

Nice password generator. Great job. Thanks!

I saw a deprecation warning while installing in debian 12 bookworm:

This seem related to future pip 23.1 version:

$ python --version
Python 3.11.2
$ pip --version version
pip 23.0.1 from /app/venv/lib/python3.11/site-packages/pip (python 3.11)

# pip install xkcdpass
Collecting xkcdpass
  Using cached xkcdpass-1.19.8.tar.gz (2.7 MB)
  Preparing metadata (setup.py) ... done
Installing collected packages: xkcdpass
  DEPRECATION: xkcdpass is being installed using the legacy 'setup.py install' method,
  because it does not have a 'pyproject.toml' and the 'wheel' package is not installed.
  pip 23.1 will enforce this behaviour change. A possible replacement is to enable 
  the '--use-pep517' option. 
  Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for xkcdpass ... done
Successfully installed xkcdpass-1.19.8

Reproduce:

Dockerfile.xkcdpass 📁

# - python 3.11 (from bookworm debian 12)
FROM debian:bookworm
# Disable interactive prompts on package installation
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y  --no-install-recommends \
        ca-certificates \
        python3.11-venv \
        python3 \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# installing our app
WORKDIR /app
RUN python3 -m venv venv
# put our venv first in $PATH
ENV PATH=/app/venv/bin:$PATH
# starting here, it uses our venv
RUN pip install xkcdpass
docker build -t xkcdpass -f Dockerfile.xkcdpass .
redacted commented 7 months ago

Hi @Sylvain303 - thank you for the kind words! I have created a created a packaging branch to track updating the packaging to use a pyproject.toml

hatch build appears to work correctly when run against that branch but I'm not completely up to speed with best-practices here, so any thoughts or feedback would be appreciated.