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

Modernize packaging #1

Merged
merged 2 commits into from
Jun 8, 2024
Merged

Modernize packaging #1

merged 2 commits into from
Jun 8, 2024

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Apr 27, 2024

In preparation for Sopel 8 and with the ongoing effort to modernize packaging everywhere:

  • Added a pyproject.toml for modern packaging
  • Added a Makefile to perform make develop build ("release" could be added, if asked)
  • Removed setuptools packaging information from setup.cfg
  • Removed setup.py
  • Moved code from __init__.py into plugin.py, as to prepare future change (with config and stuff)
  • Added flake8, pylint, and pyroma linters
  • Added a "if sopel 8" bit to properly manage IRC identifiers once Sopel 8 is out

To release on pypi, use python -m twine upload dist/* after using the make build command.

You can now use make develop to automatically update your virtualenv and have an editable install.

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

The Makefile and added dev-tools is a bit more than just "Modernize packaging", but I know you mean well 🤪

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
Makefile Show resolved Hide resolved
dev-requirements.txt Outdated Show resolved Hide resolved
@dgw
Copy link
Member

dgw commented Jun 2, 2024

@Exirel If you can get back to this soon-ish, that'd be helpful. Otherwise I will most likely implement my own subset of it—just the packaging and "if Sopel 8" parts, no extra tooling—for a version-bump compatible with Sopel 8.0.

@Exirel
Copy link
Contributor Author

Exirel commented Jun 2, 2024

@Exirel If you can get back to this soon-ish, that'd be helpful.

Yup, done!

Edit: I'm waiting on your approval to squash these commits.

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Have I tested all the extra build/dev tools? No, lol. But I trust you to create a better dev environment than me, at this point.

About all I can say about this rework is that it's probably not necessary to keep the py2 stuff (e.g. encoding comment) around. sopel-slap 0.1 will work with Sopel 7.x indefinitely, and 0.2 could just be for 8+ only now that 8.0 has released.

pyproject.toml Outdated Show resolved Hide resolved
@dgw
Copy link
Member

dgw commented Jun 5, 2024

While awaiting a squash, I have set up Trusted Publishing for this repository so I can easily cut a new release post-merge. 😺

@Exirel
Copy link
Contributor Author

Exirel commented Jun 6, 2024

Github is annoying, it didn't send me the approval email notification, so I didn't see it until now. Will see if I can manage that tonight.

@Exirel
Copy link
Contributor Author

Exirel commented Jun 7, 2024

Squashed and I removed 3.7 as well.

Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Little backward-compatibility nit, sorry 😅

pyproject.toml Show resolved Hide resolved
@dgw dgw merged commit 058a94c into sopel-irc:master Jun 8, 2024
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.

2 participants