Unverified Commit a5400b09 authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

rendercv: 2.6 -> 2.7 (#497270)

parents 3b5e6b49 195196bc
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
diff --git a/src/rendercv/cli/create_theme_command/create_theme_command.py b/src/rendercv/cli/create_theme_command/create_theme_command_fixed.py
index 3812d5b..42a69db 100644
--- a/src/rendercv/cli/create_theme_command/create_theme_command.py
+++ b/src/rendercv/cli/create_theme_command/create_theme_command_fixed.py
@@ -1,3 +1,4 @@
+import os
 import pathlib
 import textwrap
 from typing import Annotated
@@ -35,11 +36,21 @@ def cli_command_create_theme(
 
     copy_templates("typst", new_theme_folder)
 
+    # Explicit directory permissions
+    pathlib.Path.chmod(new_theme_folder, 0o755)
+    # Explicit files and sub-directories permissions recursively
+    for root, directories, files in os.walk(new_theme_folder):
+        for directory in directories:
+            pathlib.Path.chmod(pathlib.Path(root) / directory, 0o755)
+        for file in files:
+            pathlib.Path.chmod(pathlib.Path(root) / file, 0o644)
+
     # Create the __init__.py file for the new theme:
     create_init_file_for_theme(theme_name, new_theme_folder / "__init__.py")
 
     # Build the panel
-    message = textwrap.dedent(f"""
+    message = textwrap.dedent(
+        f"""
         [green]✓[/green] Created your custom theme: [purple]./{theme_name}[/purple]
 
         What you can do with this theme:
@@ -52,7 +63,8 @@ def cli_command_create_theme(
         To use your theme, set in your YAML input file:
         [cyan]  design:
         [cyan]    theme: {theme_name}
-    """).strip("\n")
+    """
+    ).strip("\n")
 
     print(
         rich.panel.Panel(
+16 −6
Original line number Diff line number Diff line
@@ -6,14 +6,14 @@

python3Packages.buildPythonApplication (finalAttrs: {
  pname = "rendercv";
  version = "2.6";
  version = "2.7";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rendercv";
    repo = "rendercv";
    tag = "v${finalAttrs.version}";
    hash = "sha256-lGeZt/ctNmZu6kSTpH4JTmgOwR9gS6RVkWu0gr4FK4k=";
    hash = "sha256-2ClS/RwfAhjo+bh1fTiir1YCVelDJPOjp+Z3GHVzF4E=";
  };

  build-system = with python3Packages; [ uv-build ];
@@ -26,20 +26,29 @@ python3Packages.buildPythonApplication (finalAttrs: {
    pycountry
    pydantic-extra-types
    ruamel-yaml
    packaging
    markdown
    # full
    typer
    markdown
    watchdog
    typst
    rendercv-fonts
    packaging
  ];

  pythonRelaxDeps = [
    "phonenumbers"
    "pydantic-extra-types"
    "markdown"
  ];

  patches = [
    ./fix_theme_directory_permissions.patch
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "uv_build>=0.10.3,<0.11.0" "uv_build"
  '';

  pythonImportsCheck = [ "rendercv" ];

  nativeCheckInputs = with python3Packages; [
@@ -51,6 +60,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
    # It fails due to missing internet resources
    "tests/renderer/test_pdf_png.py"
    "tests/cli/render_command/test_render_command.py"
    "tests/test_pyodide.py"
  ];

  doCheck = true;
@@ -58,7 +68,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
  meta = {
    description = "Typst-based CV/resume generator";
    homepage = "https://rendercv.com";
    changelog = "https://docs.rendercv.com/changelog/#26-december-23-2025";
    changelog = "https://docs.rendercv.com/changelog/#27-march-6-2026";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ theobori ];
    mainProgram = "rendercv";