python312Packages.markitdown: init at 0-unstable-2024-12-15 (#365681)

This commit is contained in:
Pol Dellaiera
2024-12-18 09:55:22 +01:00
committed by GitHub
7 changed files with 315 additions and 0 deletions
@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
gitUpdater,
}:
buildPythonPackage rec {
pname = "cobble";
version = "0.1.4";
pyproject = true;
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "python-cobble";
tag = version;
hash = "sha256-xi6cCSUnMYc5Tp6+TQlC9Oo9kpam5C7QGCul/IoTW1k=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "cobble" ];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [ "tests.py" ];
disabledTests = [
# Broken tests
#
# left = "Can't instantiate abstract class Evaluator with abstract method visit_add"
# right = "Can't instantiate abstract class Evaluator without an implementation for abstract method 'visit_add'"
"test_error_if_visitor_is_missing_methods"
# left = "Can't instantiate abstract class Evaluator with abstract method visit_literal"
# right = "Can't instantiate abstract class Evaluator without an implementation for abstract method 'visit_literal'"
"test_sub_sub_classes_are_included_in_abc"
];
passthru.updateScripts = gitUpdater { };
meta = {
description = "Create Python data objects";
homepage = "https://github.com/mwilliamson/python-cobble";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ drupol ];
};
}
@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
precisely,
gitUpdater,
}:
buildPythonPackage rec {
pname = "funk";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "funk";
tag = version;
hash = "sha256-dEq3zyA8rtNt0sui2TfQ3OUSCZ0XDMOdthcqt/QrCsU=";
};
build-system = [ setuptools ];
dependencies = [ precisely ];
pythonImportsCheck = [ "funk" ];
# Disabling tests, they rely on Nose which is outdated and not supported
doCheck = false;
passthru.updateScripts = gitUpdater { };
meta = {
description = "A mocking framework for Python, influenced by JMock";
homepage = "https://github.com/mwilliamson/funk";
changelog = "https://github.com/mwilliamson/funk/blob/${src.tag}/NEWS";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ drupol ];
};
}
@@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cobble,
funk,
pytestCheckHook,
spur,
tempman,
gitUpdater,
}:
buildPythonPackage rec {
pname = "mammoth";
version = "1.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "python-mammoth";
tag = version;
hash = "sha256-mIvzEyKpy1j7tZti+QTXgsbqqZAhYs7N+p5sQFsLhBg=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'read("README")' '""'
'';
build-system = [ setuptools ];
dependencies = [ cobble ];
pythonImportsCheck = [ "mammoth" ];
nativeCheckInputs = [
funk
pytestCheckHook
spur
tempman
];
preCheck = ''
export PATH=$out/bin:$PATH
'';
passthru.updateScripts = gitUpdater { };
meta = {
description = "Convert Word documents (.docx files) to HTML";
homepage = "https://github.com/mwilliamson/python-mammoth";
changelog = "https://github.com/mwilliamson/python-mammoth/blob/${src.tag}/NEWS";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ drupol ];
};
}
@@ -0,0 +1,76 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
beautifulsoup4,
ffmpeg-headless,
mammoth,
markdownify,
numpy,
openai,
openpyxl,
pandas,
pathvalidate,
pdfminer-six,
puremagic,
pydub,
python-pptx,
requests,
speechrecognition,
youtube-transcript-api,
pytestCheckHook,
gitUpdater,
}:
buildPythonPackage {
pname = "markitdown";
version = "unstable-2024-12-18";
pyproject = true;
src = fetchFromGitHub {
owner = "microsoft";
repo = "markitdown";
rev = "3ce21a47abed0e4db162de1088d661887ae076ff";
hash = "sha256-5YafFL8OHNcGgB/qH6CmX0rTith1ZSRNIa+ktl4Ffvg=";
};
build-system = [ hatchling ];
dependencies = [
beautifulsoup4
ffmpeg-headless
mammoth
markdownify
numpy
openai
openpyxl
pandas
pathvalidate
pdfminer-six
puremagic
pydub
python-pptx
requests
speechrecognition
youtube-transcript-api
];
pythonImportsCheck = [ "markitdown" ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Require network access
"test_markitdown_remote"
];
passthru.updateScripts = gitUpdater { };
meta = {
description = "Python tool for converting files and office documents to Markdown";
homepage = "https://github.com/microsoft/markitdown";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ drupol ];
};
}
@@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
gitUpdater,
}:
buildPythonPackage rec {
pname = "precisely";
version = "0.1.9";
pyproject = true;
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "python-precisely";
tag = version;
hash = "sha256-jvvRreSGpRgDk1bbqC8Z/UEfvxwKilfc/sm7nxdJU6k=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "precisely" ];
# Tests are outdated and based on Nose, which is not supported anymore.
doCheck = false;
passthru.updateScripts = gitUpdater { };
meta = {
description = "Matcher library for Python";
homepage = "https://github.com/mwilliamson/python-precisely";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ drupol ];
};
}
@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
gitUpdater,
}:
buildPythonPackage rec {
pname = "tempman";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "python-tempman";
tag = version;
hash = "sha256-EHTnlT3vcmyjyyS3QCJXjAuZqOEc0i11rEb6zfX6rDY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'read("README")' '""'
'';
build-system = [ setuptools ];
pythonImportsCheck = [ "tempman" ];
# Disabling tests, they rely on dependencies that are outdated and not supported
doCheck = false;
passthru.updateScripts = gitUpdater { };
meta = {
description = "Create and clean up temporary directories";
homepage = "https://github.com/mwilliamson/python-tempman";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ drupol ];
};
}
+12
View File
@@ -2480,6 +2480,8 @@ self: super: with self; {
coapthon3 = callPackage ../development/python-modules/coapthon3 { };
cobble = callPackage ../development/python-modules/cobble { };
coconut = callPackage ../development/python-modules/coconut { };
cocotb = callPackage ../development/python-modules/cocotb { };
@@ -4965,6 +4967,8 @@ self: super: with self; {
funcy = callPackage ../development/python-modules/funcy { };
funk = callPackage ../development/python-modules/funk { };
funsor = callPackage ../development/python-modules/funsor { };
furl = callPackage ../development/python-modules/furl { };
@@ -7803,6 +7807,8 @@ self: super: with self; {
malduck = callPackage ../development/python-modules/malduck { };
mammoth = callPackage ../development/python-modules/mammoth { };
mamba-ssm = callPackage ../development/python-modules/mamba-ssm { };
managesieve = callPackage ../development/python-modules/managesieve { };
@@ -7863,6 +7869,8 @@ self: super: with self; {
markdownify = callPackage ../development/python-modules/markdownify { };
markitdown = callPackage ../development/python-modules/markitdown { };
marko = callPackage ../development/python-modules/marko { };
markupsafe = callPackage ../development/python-modules/markupsafe { };
@@ -10404,6 +10412,8 @@ self: super: with self; {
ppk2-api = callPackage ../development/python-modules/ppk2-api { };
precisely = callPackage ../development/python-modules/precisely { };
primp = callPackage ../development/python-modules/primp {
inherit (pkgs.darwin.apple_sdk.frameworks) SystemConfiguration;
};
@@ -15749,6 +15759,8 @@ self: super: with self; {
templateflow = callPackage ../development/python-modules/templateflow { };
tempman = callPackage ../development/python-modules/tempman { };
tempora = callPackage ../development/python-modules/tempora { };
tenacity = callPackage ../development/python-modules/tenacity { };