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

update packaging and testing and drop EoL Pythons #41

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

terencehonles
Copy link

@terencehonles terencehonles commented Nov 1, 2024

This tackles a few points on #40, but will have a failing test without #39

fixes: #36 , fixes: #37

@terencehonles terencehonles force-pushed the update-packaging-and-testing-and-drop-eol-pythons branch from 9d5825b to fb7efd5 Compare November 1, 2024 18:17
@terencehonles terencehonles force-pushed the update-packaging-and-testing-and-drop-eol-pythons branch from fb7efd5 to 60a396b Compare November 2, 2024 12:54
MANIFEST.in Outdated Show resolved Hide resolved
Copy link
Author

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
Copy link
Author

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 .
Copy link
Author

@terencehonles terencehonles Nov 2, 2024

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
Copy link
Author

@terencehonles terencehonles Nov 2, 2024

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

Copy link
Author

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
Copy link
Author

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,
Copy link
Author

@terencehonles terencehonles Nov 2, 2024

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
Copy link
Author

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:

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

@terencehonles terencehonles force-pushed the update-packaging-and-testing-and-drop-eol-pythons branch 2 times, most recently from b771f06 to 8d4045c Compare November 4, 2024 10:41
@terencehonles terencehonles force-pushed the update-packaging-and-testing-and-drop-eol-pythons branch from 8d4045c to 83283c7 Compare November 4, 2024 11:10
@terencehonles
Copy link
Author

terencehonles commented Nov 4, 2024

I've verified that the packaging creates the same assets (aside from the previously missing pointer.css and now minified lightbox.min.css stylesheets and the legacy namespace metadata):

  • old tar: sphinxcontrib-images-0.9.4.tar.gz

    sphinxcontrib-images-0.9.4/
    sphinxcontrib-images-0.9.4/LICENSE.txt
    sphinxcontrib-images-0.9.4/MANIFEST.in
    sphinxcontrib-images-0.9.4/PKG-INFO
    sphinxcontrib-images-0.9.4/README.rst
    sphinxcontrib-images-0.9.4/setup.cfg
    sphinxcontrib-images-0.9.4/setup.py
    sphinxcontrib-images-0.9.4/sphinxcontrib/
    sphinxcontrib-images-0.9.4/sphinxcontrib/__init__.py
    sphinxcontrib-images-0.9.4/sphinxcontrib/images.py
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/PKG-INFO
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/SOURCES.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/dependency_links.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/entry_points.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/namespace_packages.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/not-zip-safe
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/requires.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images.egg-info/top_level.txt
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/__init__.py
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/css/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/css/lightbox.css
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/close.png
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/loading.gif
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/next.png
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/prev.png
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.js
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.map
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js
    sphinxcontrib-images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2.py
    
  • new tar: dist/sphinxcontrib_images-0.9.4.tar.gz

    sphinxcontrib_images-0.9.4/
    sphinxcontrib_images-0.9.4/LICENSE.txt
    sphinxcontrib_images-0.9.4/PKG-INFO
    sphinxcontrib_images-0.9.4/README.rst
    sphinxcontrib_images-0.9.4/pyproject.toml
    sphinxcontrib_images-0.9.4/setup.cfg
    sphinxcontrib_images-0.9.4/sphinxcontrib/
    sphinxcontrib_images-0.9.4/sphinxcontrib/images.py
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/PKG-INFO
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/SOURCES.txt
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/dependency_links.txt
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/entry_points.txt
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/requires.txt
    sphinxcontrib_images-0.9.4/sphinxcontrib_images.egg-info/top_level.txt
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/__init__.py
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/css/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/css/lightbox.min.css
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/close.png
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/loading.gif
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/next.png
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/images/prev.png
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.js
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.map
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/pointer.css
    sphinxcontrib_images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2.py
    
  • old wheel: sphinxcontrib_images-0.9.4-py2.py3-none-any.whl

      Archive:  sphinxcontrib_images-0.9.4-py2.py3-none-any.whl
    Archive:  sphinxcontrib_images-0.9.4-py2.py3-none-any.whl
      Length      Date    Time    Name
    ---------  ---------- -----   ----
          574  2021-08-09 04:50   sphinxcontrib_images-0.9.4-py3.7-nspkg.pth
        12838  2021-08-08 21:31   sphinxcontrib/images.py
           34  2021-08-01 20:30   sphinxcontrib_images_lightbox2/__init__.py
         2713  2021-08-05 20:32   sphinxcontrib_images_lightbox2/lightbox2.py
         3580  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/css/lightbox.css
          280  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/images/close.png
         8476  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/images/loading.gif
         1350  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/images/next.png
         1360  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/images/prev.png
        98688  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.js
       144969  2021-08-05 19:41   sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.map
           26  2021-08-01 20:30   sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js
        10173  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/LICENSE.txt
         3335  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/METADATA
          110  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/WHEEL
          208  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/entry_points.txt
           14  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/namespace_packages.txt
           45  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/top_level.txt
         2046  2021-08-09 04:50   sphinxcontrib_images-0.9.4.dist-info/RECORD
    ---------                     -------
       290819                     19 files
    
    
  • new wheel: dist/sphinxcontrib_images-0.9.4-py3-none-any.whl

    Archive:  dist/sphinxcontrib_images-0.9.4-py3-none-any.whl
      Length      Date    Time    Name
    ---------  ---------- -----   ----
        12900  2024-11-04 10:54   sphinxcontrib/images.py
           34  2020-07-21 22:43   sphinxcontrib_images_lightbox2/__init__.py
         2760  2024-11-04 10:54   sphinxcontrib_images_lightbox2/lightbox2.py
         2532  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/css/lightbox.min.css
          280  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/images/close.png
         8476  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/images/loading.gif
         1350  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/images/next.png
         1360  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/images/prev.png
        98688  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.js
       144969  2024-11-01 18:09   sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.map
           26  2020-07-21 22:43   sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js
           68  2024-11-01 16:36   sphinxcontrib_images_lightbox2/lightbox2-customize/pointer.css
        10173  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/LICENSE.txt
         3285  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/METADATA
           91  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/WHEEL
          207  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/entry_points.txt
           45  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/top_level.txt
         1954  2024-11-04 11:09   sphinxcontrib_images-0.9.4.dist-info/RECORD
    ---------                     -------
       289198                     18 files
    
    

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