Skip to content
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

Migrate pyproject toml #729

Closed
wants to merge 34 commits into from
Closed

Migrate pyproject toml #729

wants to merge 34 commits into from

Conversation

semuadmin
Copy link

setup.py is now deprecated and is scheduled to be dropped altogether in pip 23.

This PR makes a number of changes to update the project build framework:

  1. It updates the paho.mqtt project structure to use pyproject.toml, while retaining setuptools as a back-end build platform.
  2. It uses pyproject.toml tool configuration sections were available.
  3. It drops support for Python versions <=3.6 as these are now end of life.
  4. It adds a minimal VS Code workflow including the following tasks (Eclipse IDE users can simply ignore these):
  • The Build task will produce wheel (.whl) and sdist (.tar.gz) install packages in the dist folder which can be uploaded to PyPi using twine.
  • The Install Locally task will install this wheel using pip.
  • Other VS Code tasks have been added mirroring the current GitHub Actions (GHA) CI worfklows.

NB: this PR only changes the build setup - no changes have been made to existing application code or test cases, so some existing CI workflows may still fail if they were failing previously.

Fixes #706

README.rst Show resolved Hide resolved
Vagrantfile Outdated Show resolved Hide resolved
@cclauss
Copy link
Contributor

cclauss commented May 31, 2023

@ralight Your review please.

@semuadmin
Copy link
Author

semuadmin commented May 31, 2023

@cclauss What's the game plan with regard to the lint_python pytest failures in GHA? AFAICS these are nothing to do with anything I've changed as part of this PR and I'm not best placed to resolve them?

@semuadmin
Copy link
Author

Is this repo still actively maintained?

Copy link
Contributor

@PierreF PierreF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution. Could you add a Signed-Off to your commit ? This is a requirement from Eclipse to acknowledge you agree with the ECA.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop this file, couldn't we ? I don't see reason to kept them.

.vscode/tasks.json Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without tox, how do we run linters ? I want to kept the ability to run linters & tests locally and not only relying on Github actions.

With tox, I only need to run two commands: tox -e py and tox -e lint. Everything was handled:

  • creation of virtualenv, installation of dependency
  • running test and linters command (for linters it's valuable, since we have multiple linters)

tox might not be the best tool for this usecase (here we don't use tox for it's ability to run on multiple Python versions, I use different Docker containers for that) that but it works and it's a well-known tools. I think we should kept it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without tox, how do we run linters ?

One common option is https://pre-commit.com/ which can also be easily run in CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be best to upgrade to pre-commit to automate the fast tests like ruff, codespell, black.

@semuadmin semuadmin closed this Dec 21, 2023
@semuadmin
Copy link
Author

semuadmin commented Dec 21, 2023

sorry no longer have the bandwidth to progress this

@cclauss
Copy link
Contributor

cclauss commented Dec 21, 2023

@akx Given that both @semuadmin and I have both closed our PRs, perhaps you can jump in with your automated tool for creating these PRs.

@akx
Copy link
Contributor

akx commented Dec 21, 2023

@cclauss I don't have an automated tool per se - pyproject-migrator still needs hand-holding...

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 install deprecation warning
4 participants