diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8a29000..e3f881b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,8 +1,8 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.11" + python: "3.12" python: install: - requirements: docs/requirements.txt @@ -11,3 +11,4 @@ python: sphinx: builder: dirhtml fail_on_warning: true + configuration: docs/conf.py diff --git a/CHANGES.rst b/CHANGES.rst index 627c2db..dc27234 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Changelog ========= +1.4.1 (unreleased) +------------------ +- migrate from setup.py to pyproject.toml configuration +- fix doc building on read the docs + 1.4.0 (2023.10.03) ------------------ - fix deprecation warning for pytest diff --git a/docs/conf.py b/docs/conf.py index b5cd7da..e65b18e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -35,6 +35,16 @@ # a list of builtin themes. html_theme = 'flask' +# Theme options for the Pallets Flask theme +html_theme_options = { + 'globaltoc_maxdepth': 2, +} + +# Context for the theme +html_context = { + 'versions': [], +} + # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None diff --git a/docs/requirements.in b/docs/requirements.in index 2ef65c0..f6986ca 100644 --- a/docs/requirements.in +++ b/docs/requirements.in @@ -1,3 +1,3 @@ Sphinx Pallets-Sphinx-Themes -packaging < 22 # https://github.com/readthedocs/readthedocs.org/issues/9805 +packaging diff --git a/docs/requirements.txt b/docs/requirements.txt index 870bcca..07c6a4b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,62 +1,60 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --output-file=/home/jugmac00/Projects/flask-reuploaded/docs/requirements.txt /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in +# pip-compile --output-file=/home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.txt /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in # -alabaster==0.7.13 +alabaster==1.0.0 # via sphinx -babel==2.13.0 +babel==2.18.0 # via sphinx -certifi==2023.7.22 +certifi==2026.1.4 # via requests -charset-normalizer==3.3.0 +charset-normalizer==3.4.4 # via requests -docutils==0.20.1 +docutils==0.22.4 # via sphinx -idna==3.4 +idna==3.11 # via requests imagesize==1.4.1 # via sphinx -jinja2==3.1.2 +jinja2==3.1.6 # via sphinx -markupsafe==2.1.3 +markupsafe==3.0.3 # via jinja2 -packaging==21.3 +packaging==26.0 # via - # -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in + # -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in # pallets-sphinx-themes # sphinx -pallets-sphinx-themes==2.1.1 - # via -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in -pygments==2.16.1 +pallets-sphinx-themes==2.3.0 + # via -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in +pygments==2.19.2 # via sphinx -pyparsing==3.1.1 - # via packaging -requests==2.31.0 +requests==2.32.5 # via sphinx -snowballstemmer==2.2.0 +roman-numerals==4.1.0 # via sphinx -sphinx==7.2.6 +snowballstemmer==3.0.1 + # via sphinx +sphinx==9.1.0 # via - # -r /home/jugmac00/Projects/flask-reuploaded/docs/requirements.in + # -r /home/juergen.gmach@canonical.com/src/flask-reuploaded/docs/requirements.in # pallets-sphinx-themes - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml -sphinxcontrib-applehelp==1.0.7 + # sphinx-notfound-page +sphinx-notfound-page==1.1.0 + # via pallets-sphinx-themes +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx -urllib3==2.0.6 +urllib3==2.6.3 # via requests diff --git a/pyproject.toml b/pyproject.toml index ce8ab8f..cdacb0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,58 @@ [build-system] -requires = ["setuptools>=40.6.0", "wheel"] +requires = ["setuptools>=61.0.0"] build-backend = "setuptools.build_meta" + +[project] +name = "Flask-Reuploaded" +version = "1.4.1.dev" +description = "Flexible and efficient upload handling for Flask" +license = {text = "MIT"} +authors = [ + {name = "Matthew \"LeafStorm\" Frazier", email = "leafstormrush@gmail.com"}, +] +maintainers = [ + {name = "Jürgen Gmach", email = "juergen.gmach@googlemail.com"}, +] +requires-python = ">= 3.8" +dynamic = ["readme"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", + "Framework :: Flask", +] +dependencies = [ + "Flask>=1.0.4", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-cov", +] + +[project.urls] +Source = "https://github.com/jugmac00/flask-reuploaded" +"Issue Tracker" = "https://github.com/jugmac00/flask-reuploaded/issues" +Documentation = "https://flask-reuploaded.readthedocs.io/en/latest/" + +[tool.setuptools] +zip-safe = false +platforms = ["any"] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.dynamic] +readme = {file = ["README.rst", "CHANGES.rst"], content-type = "text/x-rst"} diff --git a/setup.py b/setup.py deleted file mode 100644 index 69cb956..0000000 --- a/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -import codecs -import os - -from setuptools import find_packages -from setuptools import setup - -HERE = os.path.abspath(os.path.dirname(__file__)) - - -def read(*parts): - """Return the contents of the read file. - - - Build an absolute path from *parts* - - Return the contents of the resulting file. - - Assume UTF-8 encoding. - - Proudly copy-pasted from Hynek's attrs project - (minus the typo). - """ - with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f: - return f.read() - - -LONG = read("README.rst") + "\n\n" + read("CHANGES.rst") - -setup( - name="Flask-Reuploaded", - version="1.4.0", - url="https://github.com/jugmac00/flask-reuploaded", - project_urls={ - "Source": "https://github.com/jugmac00/flask-reuploaded", - "Issue Tracker": "https://github.com/jugmac00/flask-reuploaded/issues", - "Documentation": "https://flask-reuploaded.readthedocs.io/en/latest/", - }, - license="MIT", - author='Matthew "LeafStorm" Frazier', - author_email="leafstormrush@gmail.com", - maintainer="Jürgen Gmach", - maintainer_email="juergen.gmach@googlemail.com", - description="Flexible and efficient upload handling for Flask", - long_description=LONG, - long_description_content_type="text/x-rst", - packages=find_packages(where="src"), - package_dir={"": "src"}, - zip_safe=False, - platforms="any", - include_package_data=True, - install_requires=["Flask>=1.0.4"], - extras_require={ - "test": [ - "pytest", - "pytest-cov", - ], - }, - python_requires=">= 3.8", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Framework :: Flask", - ], -)