From 71eedafab4ee7e6ebe1358c85534d6db469145ad Mon Sep 17 00:00:00 2001 From: Carl George Date: Jun 15 2023 03:25:10 +0000 Subject: Update to version 23.1.0 --- diff --git a/.gitignore b/.gitignore index 8156cf0..dbf03e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1 @@ -/service_identity-14.0.0.tar.gz -/service_identity-16.0.0.tar.gz -/service-identity-16.0.0.tar.gz -/service-identity-18.1.0.tar.gz -/service-identity-21.1.0.tar.gz +service_identity-*.tar.gz diff --git a/0001-Remove-coverage-from-tests-extras.patch b/0001-Remove-coverage-from-tests-extras.patch new file mode 100644 index 0000000..2cfd522 --- /dev/null +++ b/0001-Remove-coverage-from-tests-extras.patch @@ -0,0 +1,25 @@ +From 64363349fb48d9d168873d2fb23493dda5f0f9d6 Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Wed, 14 Jun 2023 13:59:39 -0500 +Subject: [PATCH] Remove coverage from tests extras + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index e5e7ee7..e732ad7 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -35,7 +35,7 @@ dynamic = ["version", "readme"] + + [project.optional-dependencies] + idna = ["idna"] +-tests = ["coverage[toml]>=5.0.2", "pytest"] ++tests = ["pytest"] + docs = ["sphinx", "furo", "myst-parser", "sphinx-notfound-page", "pyOpenSSL"] + mypy = ["mypy", "types-pyOpenSSL", "idna"] + dev = ["service-identity[tests,mypy,docs,idna]", "pyOpenSSL"] +-- +2.40.1 + diff --git a/0001-Revert-theme-change.patch b/0001-Revert-theme-change.patch deleted file mode 100644 index 8940390..0000000 --- a/0001-Revert-theme-change.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 18b24292779f8548198d3e4ada2e52d7669607e8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= -Date: Mon, 24 May 2021 13:58:40 +0200 -Subject: [PATCH] Revert theme change" - ---- - docs/conf.py | 11 +++++++++-- - setup.py | 2 +-- - 2 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/docs/conf.py b/docs/conf.py -index 1517620..e9745c6 100644 ---- a/docs/conf.py -+++ b/docs/conf.py -@@ -117,7 +117,7 @@ exclude_patterns = ["_build"] - # show_authors = False - - # The name of the Pygments (syntax highlighting) style to use. --# pygments_style = "sphinx" -+pygments_style = "sphinx" - - # A list of ignored prefixes for module index sorting. - # modindex_common_prefix = [] -@@ -131,7 +131,14 @@ exclude_patterns = ["_build"] - # The theme to use for HTML and HTML Help pages. See the documentation for - # a list of builtin themes. - --html_theme = "furo" -+html_theme = "alabaster" -+html_theme_options = { -+ "font_family": '"Avenir Next", Calibri, "PT Sans", sans-serif', -+ "head_font_family": '"Avenir Next", Calibri, "PT Sans", sans-serif', -+ "font_size": "18px", -+ "page_width": "980px", -+ "show_relbars": True, -+} - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the -diff --git a/setup.py b/setup.py -index 921725a..29012ef 100644 ---- a/setup.py -+++ b/setup.py -@@ -47,7 +46,7 @@ INSTALL_REQUIRES = [ - EXTRAS_REQUIRE = { - "idna": ["idna"], - "tests": ["coverage[toml]>=5.0.2", "pytest"], -- "docs": ["sphinx", "furo"], -+ "docs": ["sphinx"], - } - EXTRAS_REQUIRE["dev"] = ( - EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["docs"] + ["idna", "pyOpenSSL"] - --- -2.31.1 - diff --git a/python-service-identity.spec b/python-service-identity.spec index 493b20c..13abc3d 100644 --- a/python-service-identity.spec +++ b/python-service-identity.spec @@ -1,3 +1,6 @@ +%bcond tests 1 +%bcond docs 1 + %global common_description %{expand: Use this package if you use pyOpenSSL and don’t want to be MITMed, or if you want to verify that a PyCA cryptography certificate is valid for a certain @@ -8,20 +11,18 @@ service-identity implements RFC 6125 fully and plans to add other relevant RFCs too.} Name: python-service-identity -Version: 21.1.0 +Version: 23.1.0 Release: %autorelease Summary: Service identity verification for pyOpenSSL License: MIT URL: https://github.com/pyca/service-identity -Source0: %{url}/archive/%{version}/service-identity-%{version}.tar.gz -# Revert theme change as "furo" theme is not packaged -Patch0: 0001-Revert-theme-change.patch +Source: %{pypi_source service_identity} +# Downstream-only patch to disable coverage +Patch: 0001-Remove-coverage-from-tests-extras.patch BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3dist(pytest) -BuildRequires: python3dist(sphinx) %description %{common_description} @@ -41,32 +42,43 @@ This is the documentation package for %{name}. %pyproject_extras_subpkg -n python3-service-identity idna %prep -%autosetup -p1 -n service-identity-%{version} +%autosetup -p1 -n service_identity-%{version} %generate_buildrequires -%pyproject_buildrequires -x idna +%pyproject_buildrequires %{?with_tests:-x tests,idna} %{?with_docs:-x docs} %build %pyproject_wheel -# generate html docs -PYTHONPATH=%{pyproject_build_lib} sphinx-build docs html -# remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} - %install %pyproject_install %pyproject_save_files service_identity +%if %{with docs} +# Previously the docs were built with PYTHONPATH=%%{pyproject_build_lib}, but +# that macro is now deprecated. It also only works with setuptools, and +# upstream switched to hatchling. Building the docs relies on the library +# being installed, so we have to do it here in %%install instead of in %%build. +PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build docs html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + %check +%if %{with tests} %pytest -v +%else +%pyproject_check_import +%endif %files -n python3-service-identity -f %{pyproject_files} -%doc README.rst +%doc README.md +%if %{with docs} %files doc %doc html -%license LICENSE docs/license.rst +%license LICENSE +%endif %changelog %autochangelog diff --git a/sources b/sources index ef875b9..d0447ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (service-identity-21.1.0.tar.gz) = 6375bc5e8329118b2beb163ffffecc1479839e4e98173576e4737deebcc4c057ac357315976d3f53a280defd4e2c1f6b74e9604ec1aa94144240c2fb4bf07461 +SHA512 (service_identity-23.1.0.tar.gz) = bc53f563050811a2b40dbfcf1e0a1b1b5677e2b48ed4e94e37d29735baea49ed7a7099d656444c0054fa2c23ae96026e67919cf24b01a3ae6b3549fd25dfe4d1