Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.pdfminer-six: 20231228 -> 20240706 #329409

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions pkgs/development/python-modules/commoncode/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
buildPythonPackage,
click,
fetchFromGitHub,
fetchpatch2,
pytest-xdist,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
requests,
saneyaml,
Expand All @@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "commoncode";
version = "31.2.1";
format = "pyproject";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -30,11 +30,19 @@ buildPythonPackage rec {
hash = "sha256-4ZgyNlMj1i1fRru4wgDOyP3qzbne8D2eH/tFI60kgrE=";
};

patches = [
# https://github.com/nexB/commoncode/pull/66
(fetchpatch2 {
url = "https://github.com/nexB/commoncode/commit/4f87b3c9272dcf209b9c4b997e98b58e0edaf570.patch";
hash = "sha256-loUtAww+SK7kMt5uqZmLQ8Wg/OqB7LWVA4BiztnwHsA=";
})
];

dontConfigure = true;

nativeBuildInputs = [ setuptools-scm ];
build-system = [ setuptools-scm ];

propagatedBuildInputs = [
dependencies = [
attrs
beautifulsoup4
click
Expand All @@ -48,11 +56,6 @@ buildPythonPackage rec {
pytest-xdist
];

preCheck = ''
# prevent readout of /etc/os-release during tests
sed -i "s/is_on_ubuntu_22()/lambda _: False/" src/commoncode/system.py
'';

disabledTests =
[
# chinese character translates different into latin
Expand All @@ -69,11 +72,6 @@ buildPythonPackage rec {
"test_searchable_paths"
];

disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [
# https://github.com/nexB/commoncode/issues/36
"src/commoncode/fetch.py"
];

pythonImportsCheck = [ "commoncode" ];

meta = with lib; {
Expand Down
14 changes: 8 additions & 6 deletions pkgs/development/python-modules/debian-inspector/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
buildPythonPackage rec {
pname = "debian-inspector";
version = "31.1.0";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";

src = fetchPypi {
pname = "debian_inspector";
Expand All @@ -25,15 +25,17 @@ buildPythonPackage rec {

dontConfigure = true;

nativeBuildInputs = [ setuptools-scm ];
build-system = [ setuptools-scm ];

propagatedBuildInputs = [
dependencies = [
chardet
attrs
commoncode
];

nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
commoncode
pytestCheckHook
];

pythonImportsCheck = [ "debian_inspector" ];

Expand Down
27 changes: 10 additions & 17 deletions pkgs/development/python-modules/pdfminer-six/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
lib,
buildPythonPackage,
fetchFromGitHub,
importlib-metadata,
isPy3k,
cryptography,
charset-normalizer,
pythonOlder,
typing-extensions,
pytestCheckHook,
setuptools,
substituteAll,
Expand All @@ -16,16 +13,16 @@

buildPythonPackage rec {
pname = "pdfminer-six";
version = "20231228";
version = "20240706";
pyproject = true;

disabled = !isPy3k;
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "pdfminer";
repo = "pdfminer.six";
rev = version;
hash = "sha256-LXPECQQojD3IY9zRkrDBufy4A8XUuYiRpryqUx/I3qo=";
rev = "refs/tags/${version}";
hash = "sha256-aY7GQADRxeiclr6/G3RRgrPcl8rGiC85JYEIjIa+vG0=";
};

patches = [
Expand All @@ -35,17 +32,12 @@ buildPythonPackage rec {
})
];

nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];

propagatedBuildInputs =
[
charset-normalizer
cryptography
]
++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
typing-extensions
];
dependencies = [
charset-normalizer
cryptography
];

postInstall = ''
for file in $out/bin/*.py; do
Expand All @@ -67,6 +59,7 @@ buildPythonPackage rec {
};

meta = with lib; {
changelog = "https://github.com/pdfminer/pdfminer.six/blob/${src.rev}/CHANGELOG.md";
description = "PDF parser and analyzer";
homepage = "https://github.com/pdfminer/pdfminer.six";
license = licenses.mit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
diff --git a/setup.py b/setup.py
index 42764e2..e7b93d3 100644
--- a/setup.py
+++ b/setup.py
@@ -7,10 +7,7 @@
@@ -19,10 +19,7 @@ if sys.version_info < (3, 12):

setup(
name="pdfminer.six",
- setuptools_git_versioning={
- "enabled": True,
- },
- setup_requires=["setuptools-git-versioning<2"],
- setup_requires=["setuptools-git-versioning<3"],
+ version="@version@",
packages=["pdfminer"],
package_data={"pdfminer": ["cmap/*.pickle.gz", "py.typed"]},
Expand Down