LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
377 stars 108 forks source link

Fix: DEPRECATION: pyscard 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. #146

Closed LudovicRousseau closed 4 months ago

LudovicRousseau commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

See https://github.com/LudovicRousseau/pyscard/issues/145

Steps for reproducing this issue:

$ pip install pyscard
Collecting pyscard
  Using cached pyscard-2.0.5.tar.gz (150 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: pyscard
  DEPRECATION: pyscard 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 pyscard ... done
Successfully installed pyscard-2.0.5
LudovicRousseau commented 1 year ago

See Python Packaging User Guide and pypackaging-native

pyproject.toml to replace setup.py

PEP 517 – A build-system independent format for source trees

PEP 518 – Specifying Minimum Build System Requirements for Python Projects

bittner commented 1 year ago

It should be sufficient to add a (empty) pyproject.toml file and use build to build your package. This way, you can keep setup.py in place and don't need to change a lot, if that worries you.

LudovicRousseau commented 4 months ago

A pyproject.toml file has been added in https://github.com/LudovicRousseau/pyscard/commit/306aff2063f7f01bcd15e11e766124fd5ccc7e15