Skip to content

migrate setup.py to pyproject.toml #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felixp98
Copy link

Overview

Installing json2html on pip 25.x raises the following warning:

DEPRECATION: Building 'json2html' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the --use-pep517 option, (possibly combined with --no-build-isolation), or adding a pyproject.toml file to the source tree of 'json2html'. Discussion can be found at pypa/pip#6334

This pull request provides pyproject.toml support.

What has changed?

  • setup.py, setup.cfg and MANIFEST.in have been removed and swapped to use pyproject.toml with a setuptools build backend.
  • patch version has been bumped to reflect changes

Will this change functionality?

Yes, in the following ways

  • pyproject.toml based builds do not support python2, so this will have to be dropped.

The requires-python >= 3.6 is arbitrary, this can be adjusted if you believe older versions still need support.

How do I build and deploy this now?

Using build and twine

  • Install the build dependencies

pip install build twine

  • Build the package

python -m build .

  • Test

    • ⚠️ Didn't know how to migrate this coverage run --source=json2html setup.py test?
  • Upload the package

twine upload dist/*

Did you test this?

Yes, in the following manner:

  1. Build the package ---> python -m build .
  2. Install to local venv ---> pip install ./dist/progress-1.3.1-py3-none-any.whl
  3. Move test script to somewhere it can't locally pickup the progress dist
  4. Run the tests python run_tests.py

Closes #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip reports legacy setup.py bdist wheel mechanism is deprecated
1 participant