forked from pool/python-python-poppler
Accepting request 839768 from home:frispete:python
Tomáš, have a look at this iteration, please. OBS-URL: https://build.opensuse.org/request/show/839768 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-poppler?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
15
_service
Normal file
15
_service
Normal file
@@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="url">git://github.com/cbrunet/python-poppler</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="exclude">pybind11</param>
|
||||
<param name="version">0.2.2</param>
|
||||
<param name="revision">v0.2.2</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="compression">xz</param>
|
||||
<param name="file">*.tar</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">git://github.com/cbrunet/python-poppler</param>
|
||||
<param name="changesrevision">04ddb469ec2dcabd84c7224eec02f8f72842eb1d</param></service></servicedata>
|
3
python-poppler-0.2.2.tar.xz
Normal file
3
python-poppler-0.2.2.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2be62708cdfd90928a3aceaa488f398cf2e6e7b5f6d497fd19bcf48f0a924690
|
||||
size 108232
|
53
python-python-poppler.changes
Normal file
53
python-python-poppler.changes
Normal file
@@ -0,0 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 6 10:45:50 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- Add use-system-pybind11.patch to use system provided pybind11
|
||||
- Exclude pybind11 from _service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 3 18:36:27 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- Fix fdupes
|
||||
- Package license
|
||||
- Use %pytest_arch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 03 11:14:01 UTC 2020 - hpj@urpla.net
|
||||
|
||||
- Update to version 0.2.2:
|
||||
* Put changelog in doc (#22)
|
||||
* lower required python version to 3.6 (#21)
|
||||
* Fix corrupted document buffer (#20)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 1 16:45:31 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- Switch to git release by disabled service (pypi is missing tests)
|
||||
- Enable tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 01 15:31:46 UTC 2020 - hpj@urpla.net
|
||||
|
||||
- Update to version 0.2.1+git20200930.d09bfc7:
|
||||
* fix initializer list for some compilers (#18)
|
||||
* invoke apidoc when running tox -e docs (#15)
|
||||
* Lower minimum poppler-cpp version to 0.26.0 (#13)
|
||||
* Documentation (#10)
|
||||
* Fixes for 20 08 (#11)
|
||||
* Verbose nested namespace syntax (not C++17) (#7)
|
||||
* fix include paths (#3)
|
||||
* ensure document is unlocked (#5)
|
||||
* Fixed byte order in image format string
|
||||
* Add automated tests for latest version of Poppler (#1)
|
||||
- Remove fix-initializer-list-for-some-compilers.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 30 13:15:15 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- Apply fix-initializer-list-for-some-compilers.patch to fix a
|
||||
32bit build issue
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 25 16:32:20 UTC 2020 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- Version 0.2.1: initial build
|
78
python-python-poppler.spec
Normal file
78
python-python-poppler.spec
Normal file
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# spec file for package python-python-poppler
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2020 LISA GmbH ,Bingen, 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-python-poppler
|
||||
Version: 0.2.2
|
||||
Release: 0
|
||||
Summary: Python binding to the poppler-cpp library
|
||||
License: GPL-2.0-only
|
||||
Group: Development/Libraries/Python
|
||||
URL: https://github.com/cbrunet/python-poppler
|
||||
Source: python-poppler-%{version}.tar.xz
|
||||
Patch: use-system-pybind11.patch
|
||||
BuildRequires: python3
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pybind11-devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: pkgconfig(poppler)
|
||||
# some tests require this this
|
||||
BuildRequires: poppler-data
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
python-poppler is a Python binding to the poppler-cpp library. It allows to
|
||||
read, render, or modify PDF documents. More specifically, it currently allows
|
||||
to:
|
||||
read an modify document meta data;
|
||||
list and read embedded documents;
|
||||
list the fonts used by the document;
|
||||
search or extract text on a given page of the document;
|
||||
render a page to a raw image;
|
||||
get info about transitions effects between the pages;
|
||||
read the table of contents of the document.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n python-poppler-%version
|
||||
sed -i -e 's/-j2/%{?_smp_mflags}/' setup.py
|
||||
|
||||
%build
|
||||
export CXXFLAGS="%{optflags}"
|
||||
%python_build --debug
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
%pytest_arch tests
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%doc README.md
|
||||
%{python_sitearch}/
|
||||
|
||||
%changelog
|
41
use-system-pybind11.patch
Normal file
41
use-system-pybind11.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 936467d..0f97a75 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,8 +6,8 @@ list(APPEND Targets "page_renderer" "page_transition")
|
||||
list(APPEND Targets "embedded_file" "destination" "toc" "font")
|
||||
|
||||
|
||||
-# find_package(pybind11)
|
||||
-add_subdirectory(pybind11)
|
||||
+find_package(pybind11)
|
||||
+# add_subdirectory(pybind11)
|
||||
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c1ba5f6..34f6ac3 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -43,6 +43,7 @@ class CMakeBuild(build_ext):
|
||||
cmake_args = [
|
||||
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
|
||||
"-DPYTHON_EXECUTABLE=" + sys.executable,
|
||||
+ "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON",
|
||||
]
|
||||
|
||||
cfg = "Debug" if self.debug else "Release"
|
||||
@@ -65,9 +66,13 @@ class CMakeBuild(build_ext):
|
||||
)
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
+ from pprint import pformat
|
||||
+ print("Env: {}\n".format(pformat(env)))
|
||||
+ print("Run: {} in {}\n".format(["cmake", ext.sourcedir] + cmake_args, self.build_temp))
|
||||
subprocess.check_call(
|
||||
["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env
|
||||
)
|
||||
+ print("Run: {} in {}\n".format(["cmake", "--build", "."] + build_args, self.build_temp))
|
||||
subprocess.check_call(
|
||||
["cmake", "--build", "."] + build_args, cwd=self.build_temp
|
||||
)
|
Reference in New Issue
Block a user