strictdoc: 0.0.26 -> 0.0.40

This commit is contained in:
Fabian Affolter 2023-05-17 20:34:49 +02:00
parent 9318364586
commit 5e342e2a4b
2 changed files with 32 additions and 61 deletions

View File

@ -1,15 +0,0 @@
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index 932747c..9b3d6ac 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -1,9 +1,7 @@
import os
import sys
-STRICTDOC_ROOT_PATH = os.path.abspath(
- os.path.join(__file__, "../../../../strictdoc")
-)
+STRICTDOC_ROOT_PATH = "@strictdoc_root_path@"
assert os.path.exists(STRICTDOC_ROOT_PATH), "does not exist: {}".format(
STRICTDOC_ROOT_PATH
)

View File

@ -1,79 +1,61 @@
{ lib { lib
, stdenv
, buildPythonApplication
, fetchFromGitHub , fetchFromGitHub
, python3 , python3
, html5lib
, invoke
, openpyxl
, poetry-core
, tidylib
, beautifulsoup4
, datauri
, docutils
, jinja2
, lxml
, markupsafe
, pygments
, reqif
, setuptools
, textx
, xlrd
, xlsxwriter
, pytestCheckHook
}: }:
buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "strictdoc"; pname = "strictdoc";
version = "0.0.26"; version = "0.0.40";
format = "pyproject"; format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "strictdoc-project"; owner = "strictdoc-project";
repo = pname; repo = pname;
rev = version; rev = "refs/tags/${version}";
sha256 = "sha256-SMAwji75AjW8CzXRKBDF+fR/a5++GhgIvkcuD+a/vp4="; hash = "sha256-kZ8qVhroSPSGAcgUFZb1vRI6JoFyjeg/0qYosbRnwyc=";
}; };
patches = [
./conftest.py.patch
];
postPatch = '' postPatch = ''
substituteInPlace ./tests/unit/conftest.py \ substituteInPlace pyproject.toml \
--replace @strictdoc_root_path@ "${placeholder "out"}/${python3.sitePackages}/strictdoc" --replace '"textx >= 3.0.0, == 3.*"' '"textx"' \
--replace '"docutils >= 0.16, == 0.*"' '"docutils"' \
substituteInPlace requirements.txt \ --replace '"pygments >= 2.10.0, == 2.*"' '"pygments"' \
--replace "jinja2 >= 2.11.2, <3.0" "jinja2 >= 2.11.2" \ --replace '"lxml >= 4.6.2, == 4.*"' '"lxml"' \
--replace "reqif >= 0.0.18, == 0.*" "reqif>=0.0.8" \ --replace '"beautifulsoup4 >= 4.12.0, == 4.*"' '"beautifulsoup4"' \
--replace "==" ">=" \ --replace '"python-datauri >= 0.2.9, == 0.*"' '"python-datauri"' \
--replace "~=" ">=" --replace '"XlsxWriter >= 1.3.7, == 1.*"' '"XlsxWriter"' \
--replace '"xlrd >= 2.0.1, == 2.*"' '"xlrd"' \
--replace '"reqif >= 0.0.33, == 0.*"' '"reqif"' \
--replace '"pybtex >= 0.23.0, == 0.*"' '"pybtex"'
''; '';
nativeBuildInputs = [ nativeBuildInputs = with python3.pkgs; [
html5lib hatchling
invoke
openpyxl
poetry-core
tidylib
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = with python3.pkgs; [
beautifulsoup4 beautifulsoup4
datauri datauri
docutils docutils
fastapi
html5lib
jinja2 jinja2
lxml lxml
markupsafe markupsafe
pybtex
pygments pygments
python-multipart
reqif reqif
setuptools setuptools
textx textx
toml
uvicorn
websockets
xlrd xlrd
xlsxwriter xlsxwriter
]; ] ++ uvicorn.optional-dependencies.standard;
nativeCheckInputs = [ nativeCheckInputs = with python3.pkgs; [
pytestCheckHook pytestCheckHook
]; ];
@ -86,10 +68,14 @@ buildPythonApplication rec {
"test_001_load_from_files" "test_001_load_from_files"
]; ];
disabledTestPaths = [
"tests/end2end/"
];
meta = with lib; { meta = with lib; {
description = "Software requirements specification tool"; description = "Software requirements specification tool";
homepage = "https://github.com/strictdoc-project/strictdoc"; homepage = "https://github.com/strictdoc-project/strictdoc";
changelog = "https://github.com/strictdoc-project/strictdoc/releases"; changelog = "https://github.com/strictdoc-project/strictdoc/releases/tag/${version}";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ yuu ]; maintainers = with maintainers; [ yuu ];
}; };