commit c122a196b1b2498131e209aae1905d538e591f0db289ae14b4d72140dffa7811 Author: Todd R Date: Mon Jun 4 16:21:27 2018 +0000 Accepting request 614044 from devel:languages:python:misc Convert images to PDF via direct JPEG inclusion OBS-URL: https://build.opensuse.org/request/show/614044 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-img2pdf?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/img2pdf-0.2.4.tar.gz b/img2pdf-0.2.4.tar.gz new file mode 100644 index 0000000..79a8a05 --- /dev/null +++ b/img2pdf-0.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:140b70fa3a3bfb54e92947818cee01483a4f1492b5d1d02b0f649257f5ffc9ae +size 54426 diff --git a/python-img2pdf.changes b/python-img2pdf.changes new file mode 100644 index 0000000..146e48d --- /dev/null +++ b/python-img2pdf.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 4 16:19:39 UTC 2018 - toddrme2178@gmail.com + +- spec file cleanups + +------------------------------------------------------------------- +Fri Oct 20 16:15:28 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-img2pdf.spec b/python-img2pdf.spec new file mode 100644 index 0000000..812a083 --- /dev/null +++ b/python-img2pdf.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-img2pdf +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test +Name: python-img2pdf +Version: 0.2.4 +Release: 0 +License: LGPL-3.0+ +Summary: Convert images to PDF via direct JPEG inclusion +Url: https://gitlab.mister-muffin.de/josch/img2pdf +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/i/img2pdf/img2pdf-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +# SECTION test requirements +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module pdfrw} +BuildRequires: python-enum34 +# /SECTION +Requires: python-Pillow +Requires: python-pdfrw +%ifpython2 +Requires: python-enum34 +%endif +Suggests: python-pdfrw +BuildArch: noarch + +%python_subpackages + +%description +Losslessly convert raster images to PDF. The file size will not +unnecessarily increase. It can for example be used to create a PDF +document from a number of scans that are only available in JPEG +format. Existing solutions would either re-encode the input JPEG +files (leading to quality loss) or store them in the zip/flate +format which results into the PDF becoming unnecessarily large in +terms of its file size. + +%prep +%setup -q -n img2pdf-%{version} +sed -i -e '/^#!\//, 1d' src/*.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec setup.py test + +%files %{python_files} +%defattr(-,root,root,-) +%doc CHANGES.rst README.md +%python3_only %{_bindir}/img2pdf +%{python_sitelib}/* + +%changelog