#4 Update to 0.9.0 (rhbz#2269156)
Merged 3 months ago by lbalhar. Opened 3 months ago by lbalhar.
rpms/ lbalhar/python-hatch-jupyter-builder rawhide  into  rawhide

file modified
+1
@@ -1,3 +1,4 @@ 

  /hatch_jupyter_builder-0.8.1.tar.gz

  /hatch_jupyter_builder-0.8.2.tar.gz

  /hatch_jupyter_builder-0.8.3.tar.gz

+ /hatch_jupyter_builder-0.9.0.tar.gz

file modified
+32 -32
@@ -1,4 +1,4 @@ 

- From 989608006455bc1300c6083cf6cbd3324ffbc218 Mon Sep 17 00:00:00 2001

+ From c331d2c3bee122c14d7bb62737d7e5108d4d2ac1 Mon Sep 17 00:00:00 2001

  From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

  Date: Mon, 6 Mar 2023 10:33:40 +0100

  Subject: [PATCH 1/2] Use tomllib from the Python 3.11+ standard library
@@ -12,7 +12,7 @@ 

   5 files changed, 24 insertions(+), 12 deletions(-)

  

  diff --git a/hatch_jupyter_builder/migrate/_migrate.py b/hatch_jupyter_builder/migrate/_migrate.py

- index 00d450e..87b709a 100644

+ index fbcfedd..a0c5535 100644

  --- a/hatch_jupyter_builder/migrate/_migrate.py

  +++ b/hatch_jupyter_builder/migrate/_migrate.py

  @@ -6,10 +6,14 @@
@@ -20,7 +20,7 @@ 

   from pathlib import Path

   

  -import tomli

-  import tomli_w

+  import tomli_w  # type:ignore[import-not-found]

   from packaging import version

   

  +try:
@@ -39,8 +39,8 @@ 

  +    data = tomllib.loads(pyproject.read_text("utf-8"))

       requires = data["build-system"]["requires"]

       # Install the old build reqs into this venv.

-      subprocess.run([sys.executable, "-m", "pip", "install", *requires])

- @@ -104,7 +108,7 @@

+      subprocess.run([sys.executable, "-m", "pip", "install", *requires], check=False)

+ @@ -105,7 +109,7 @@

   # Migrate and remove unused config.

   # Read in the project.toml after auto migration.

   logger.info("Migrating static data")
@@ -50,10 +50,10 @@ 

   

   # Handle license file.

  diff --git a/hatch_jupyter_builder/migrate/cli.py b/hatch_jupyter_builder/migrate/cli.py

- index f9c1b64..34ab802 100644

+ index a7b5253..81ce524 100644

  --- a/hatch_jupyter_builder/migrate/cli.py

  +++ b/hatch_jupyter_builder/migrate/cli.py

- @@ -27,7 +27,7 @@ def main(td, target_dir):

+ @@ -27,7 +27,7 @@ def main(td: str, target_dir: str) -> None:

       runner([python, "-m", "pip", "install", "build"])

       runner([python, "-m", "pip", "install", "packaging"])

       runner([python, "-m", "pip", "install", "tomli_w"])
@@ -63,15 +63,15 @@ 

       runner([python, "-m", "build", target_dir, "--sdist"])

   

  diff --git a/hatch_jupyter_builder/migrate/jupyter_packaging.py b/hatch_jupyter_builder/migrate/jupyter_packaging.py

- index f03931a..d286d34 100644

+ index b0c8ab6..ed3a037 100644

  --- a/hatch_jupyter_builder/migrate/jupyter_packaging.py

  +++ b/hatch_jupyter_builder/migrate/jupyter_packaging.py

- @@ -3,9 +3,13 @@

-  import sys

+ @@ -6,9 +6,13 @@

   from pathlib import Path

+  from typing import Any

   

  -import tomli

-  import tomli_w

+  import tomli_w  # type:ignore[import-not-found]

   

  +try:

  +    import tomllib
@@ -81,9 +81,9 @@ 

   __this_shim = sys.modules.pop("jupyter_packaging")

   __current_directory = sys.path.pop(0)

   

- @@ -17,7 +21,7 @@

+ @@ -20,7 +24,7 @@

   

-  def _write_config(path, data):

+  def _write_config(path: Any, data: Any) -> None:

       pyproject = Path("pyproject.toml")

  -    top = tomli.loads(pyproject.read_text(encoding="utf-8"))

  +    top = tomllib.loads(pyproject.read_text(encoding="utf-8"))
@@ -91,20 +91,20 @@ 

       parts = path.split(".")

       for part in parts[:-1]:

  diff --git a/pyproject.toml b/pyproject.toml

- index d342540..6b810ce 100644

+ index 2adf22d..6a0550c 100644

  --- a/pyproject.toml

  +++ b/pyproject.toml

- @@ -31,7 +31,7 @@ Issues = "https://github.com/jupyterlab/hatch-jupyter-builder/issues"

-  Source = "https://github.com/jupyterlab/hatch-jupyter-builder"

-  

-  [project.optional-dependencies]

- -test = ["pytest", "pytest-mock", "hatch", "pytest-cov", "tomli", "twine"]

- +test = ["pytest", "pytest-mock", "hatch", "pytest-cov", "tomli;python_version<'3.11'", "twine"]

-  docs = ["pydata-sphinx-theme", "myst-parser", "hatch_jupyter_builder", "sphinxcontrib-spelling", "sphinx-autodoc-typehints"]

-  

-  [project.scripts]

+ @@ -45,7 +45,7 @@ test = [

+    "pytest",

+    "pytest-cov",

+    "pytest-mock",

+ -  "tomli",

+ +  "tomli;python_version<'3.11'",

+    "twine",

+  ]

+  [project.urls]

  diff --git a/tests/test_migration.py b/tests/test_migration.py

- index 915dacc..4f79c5f 100644

+ index f373b13..ed7822c 100644

  --- a/tests/test_migration.py

  +++ b/tests/test_migration.py

  @@ -7,7 +7,11 @@
@@ -131,7 +131,7 @@ 

   

           # The hatchling and hatch_jupyter_builder versions might differ.

           source_data["build-system"]["requires"] = target_data["build-system"]["requires"]

- @@ -84,8 +88,8 @@ def test_create_cmdclass_migration():

+ @@ -87,8 +91,8 @@ def test_create_cmdclass_migration():

           subprocess.check_call([python, "-m", "hatch_jupyter_builder.migrate", target1])

           source_toml = source.joinpath("pyproject.toml").read_text(encoding="utf-8")

           target_toml = target1.joinpath("pyproject.toml").read_text(encoding="utf-8")
@@ -143,7 +143,7 @@ 

           # The hatchling and hatch_jupyter_builder versions might differ.

           source_data["build-system"]["requires"] = target_data["build-system"]["requires"]

  

- From 4eac392f91a4b501b2b410bdd05bd345f21e1039 Mon Sep 17 00:00:00 2001

+ From 35749190389d045f74d17d17efdcdbf7f60ca733 Mon Sep 17 00:00:00 2001

  From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

  Date: Thu, 9 Mar 2023 12:41:34 +0100

  Subject: [PATCH 2/2] Please the type checker
@@ -155,11 +155,11 @@ 

   3 files changed, 6 insertions(+), 6 deletions(-)

  

  diff --git a/hatch_jupyter_builder/migrate/_migrate.py b/hatch_jupyter_builder/migrate/_migrate.py

- index 87b709a..c2ff87c 100644

+ index a0c5535..383dca8 100644

  --- a/hatch_jupyter_builder/migrate/_migrate.py

  +++ b/hatch_jupyter_builder/migrate/_migrate.py

  @@ -9,9 +9,9 @@

-  import tomli_w

+  import tomli_w  # type:ignore[import-not-found]

   from packaging import version

   

  -try:
@@ -171,12 +171,12 @@ 

   

   logger = logging.getLogger(__name__)

  diff --git a/hatch_jupyter_builder/migrate/jupyter_packaging.py b/hatch_jupyter_builder/migrate/jupyter_packaging.py

- index d286d34..d9897b1 100644

+ index ed3a037..9f4bd85 100644

  --- a/hatch_jupyter_builder/migrate/jupyter_packaging.py

  +++ b/hatch_jupyter_builder/migrate/jupyter_packaging.py

- @@ -5,9 +5,9 @@

+ @@ -8,9 +8,9 @@

   

-  import tomli_w

+  import tomli_w  # type:ignore[import-not-found]

   

  -try:

  +if sys.version_info >= (3, 11):
@@ -187,7 +187,7 @@ 

   

   __this_shim = sys.modules.pop("jupyter_packaging")

  diff --git a/tests/test_migration.py b/tests/test_migration.py

- index 4f79c5f..8095a36 100644

+ index ed7822c..9c8b0b0 100644

  --- a/tests/test_migration.py

  +++ b/tests/test_migration.py

  @@ -8,9 +8,9 @@

@@ -1,6 +1,6 @@ 

  Name:           python-hatch-jupyter-builder

- Version:        0.8.3

- Release:        6%{?dist}

+ Version:        0.9.0

+ Release:        1%{?dist}

  Summary:        A hatch plugin to help build Jupyter packages

  License:        BSD-3-Clause

  URL:            https://pypi.org/project/hatch-jupyter-builder/
@@ -57,6 +57,9 @@ 

  

  

  %changelog

+ * Tue Mar 12 2024 Lumír Balhar <lbalhar@redhat.com> - 0.9.0-1

+ - Update to 0.9.0 (rhbz#2269156)

+ 

  * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (hatch_jupyter_builder-0.8.3.tar.gz) = c4dc0605338bafeeba21cc7260005815654d3e4646296d91af6fb3199be8645a06b2226608e6b0558ee01c7eed682162eefcf686a7e20636031b95c3a11ae265

+ SHA512 (hatch_jupyter_builder-0.9.0.tar.gz) = a91ea892e3a8fca4b5135264910fa990ff44fea899f4c92ed08ae7e57442c7258c0f24fcd66f4bbbe22557964acea4993dd190d01f96bcf6f93d92d9c80d9775

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/3dbe762046ef4bd7a6c932128f6202d7

Pull-Request has been merged by lbalhar

3 months ago