-
Notifications
You must be signed in to change notification settings - Fork 17
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
update packaging and testing and drop EoL Pythons #41
base: master
Are you sure you want to change the base?
update packaging and testing and drop EoL Pythons #41
Conversation
9d5825b
to
fb7efd5
Compare
fb7efd5
to
60a396b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this as its own file, but it can be moved to pyproject.toml too, but we'd need to ensure tox v4 I believe and probably will need to use a different Github Actions runner
wheel | ||
# last release for old versions | ||
sphinx747: sphinx==7.4.7 | ||
sphinx621: sphinx==6.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped 5.x because it looks like it has issues with Python 3.13 since it imports the removed imghdr module differently than more recent versions, and I don't know if we need to go that far back. Otherwise we can just change the envlist to not include 5x for Python 3.13, but two older releases seem sufficient.
[testenv:wheel] | ||
minversion = 3.15.0 | ||
commands = | ||
python -m build --wheel . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since building the wheel doesn't need to be tested in all the Python versions I split this out, and only test that it builds with the latest Python (at least on the CI), if you run locally I believe this will use the base Python.
commands = | ||
./setup.py bdist_wheel | ||
./setup.py install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox always installs the package (unless you say otherwise), so this was redundant
sphinxcontrib/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproject.toml handles namespace packages automatically
setup.cfg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Universal wheels are deprecated and are only needed for Python 2, so since we're dropping Python 2 this isn't needed.
author_email='tomasz.czyz@gmail.com', | ||
description='Sphinx extension for thumbnails', | ||
long_description=codecs.open('README.rst', encoding="utf8").read(), | ||
zip_safe=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's deprecated and doesn't seem to apply to Python 3 (or it can still break since you can install zip packages, but that's not standard)
pyproject.toml
Outdated
] | ||
dependencies = [ | ||
"requests>2.2,<3", | ||
"setuptools", # TODO: migrate off of pkg_resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now properly declared as a dependency until pkg_resources is not used here:
images/sphinxcontrib/images.py
Lines 285 to 288 in 30b50b8
backend = list(pkg_resources.iter_entry_points( | |
group='sphinxcontrib.images.backend', | |
name=backend_name_or_callable))[0] | |
backend = backend.load() |
It's no longer needed for namespace packages
b771f06
to
8d4045c
Compare
8d4045c
to
83283c7
Compare
I've verified that the packaging creates the same assets (aside from the previously missing
|
This tackles a few points on #40, but will have a failing test without #39
fixes: #36 , fixes: #37