-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added custom build script to switch to pyproject.toml as single sourc…
…e of truth
- Loading branch information
1 parent
df67c94
commit 403bb74
Showing
7 changed files
with
51 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os | ||
from pypandoc.pandoc_download import download_pandoc | ||
|
||
import subprocess | ||
import sys | ||
|
||
check_result = subprocess.call(["patch", "--dry-run", "-N", "-u", "pyproject.toml", "-i", "pyproject.toml.patch"]) | ||
if check_result != 0: | ||
print("Something is wrong with the pyproject.toml patch") | ||
sys.exit(1) | ||
|
||
|
||
patch_result = subprocess.check_call(["patch", "-u", "pyproject.toml", "-i", "pyproject.toml.patch"]) | ||
if patch_result != 0: | ||
print("Something went wrong when patching pyproject.toml") | ||
sys.exit(2) | ||
|
||
|
||
print("Downloading pandoc") | ||
targetfolder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "pypandoc", "files") | ||
download_pandoc(targetfolder=targetfolder) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def build(*args, **kwargs): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- pyproject.toml 2023-08-31 17:54:06.196415200 +0200 | ||
+++ pyproject.binary.toml 2023-08-31 17:57:56.021476600 +0200 | ||
@@ -1,5 +1,6 @@ | ||
[tool.poetry] | ||
-name = "pypandoc" | ||
+name = "pypandoc_binary" | ||
+include = ["pypandoc/files/*"] | ||
description = "Thin wrapper for pandoc" | ||
authors = ["JessicaTegner <jessica.tegneroutlook.com>"] | ||
license = "MIT" |
This file was deleted.
Oops, something went wrong.