8
0

add initperl_prototype.diff to fix compiler issue

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Inline-Python?expand=0&rev=22
This commit is contained in:
2024-12-18 09:08:46 +00:00
committed by Git OBS Bridge
commit a9a5a71526
7 changed files with 329 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd330eb1e6d183f4247f9e9e598558af461051fd42067b2dcd1854dce51400a1
size 61279

27
cpanspec.yml Normal file
View File

@@ -0,0 +1,27 @@
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
patches:
initperl_prototype.diff: -p1
preamble: |-
BuildRequires: python3-devel
BuildRequires: perl(Parse::RecDescent)
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
custom_build: |-
export INLINE_PYTHON_EXECUTABLE=/usr/bin/python3
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

12
initperl_prototype.diff Normal file
View File

@@ -0,0 +1,12 @@
diff -ur Inline-Python-0.57/Python.xs Inline-Python-0.57_fix/Python.xs
--- Inline-Python-0.57/Python.xs 2022-09-18 13:07:09.299412240 +0200
+++ Inline-Python-0.57_fix/Python.xs 2024-12-18 10:02:00.459704530 +0100
@@ -8,6 +8,8 @@
#include "py2pl.h"
#include "util.h"
+void initperl(void);
+
#ifdef EXPOSE_PERL
#include "perlmodule.h"
#endif

187
perl-Inline-Python.changes Normal file
View File

@@ -0,0 +1,187 @@
-------------------------------------------------------------------
Wed Dec 18 09:05:08 UTC 2024 - Dirk Stoecker <opensuse@dstoecker.de>
- add initperl_prototype.diff to fix compiler issue
-------------------------------------------------------------------
Thu Apr 20 10:47:40 UTC 2023 - Tina Müller <timueller+perl@suse.de>
- updated to 0.57
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.57 Sun Sep 18 13:20:00 CEST 2022 (Stefan Seifert)
- Try to detect more object types.
- Further tighten the "is it a dict or object" check
- Also skip List and Tuple when checking for python object
- Unify "is this an object" checks into a macro to fix method calls on strange objects
- Define PY_MAJOR_VERSION automatically
- Search for and prefer python3 when building
- Pass ASCII strings as <class 'str'> in Python 3
- Fix segfault on Python 3.10 by calling Py_Initialize() before calling PyBytes_FromString()
- Process rss information not supported by Proc::ProcessTable on Windows
-------------------------------------------------------------------
Thu Jul 14 09:21:11 UTC 2022 - Oliver Kurz <okurz@suse.com>
- updated to 0.56.5d4b1ff
see /usr/share/doc/packages/perl-Inline-Python/Changes
Switch to git commit 5d4b1ff to fix build for Python3.10
-------------------------------------------------------------------
Thu Jun 23 07:10:16 UTC 2022 - Dirk Stoecker <opensuse@dstoecker.de>
- refresh spec file
-------------------------------------------------------------------
Fri Nov 13 20:42:04 UTC 2020 - Oliver Kurz <okurz@suse.com>
- Switch to python3 as python2 is considered obsolete
-------------------------------------------------------------------
Sat Aug 5 05:45:00 UTC 2017 - coolo@suse.com
- updated to 0.56
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.56 Fri Aug 04 15:30:00 CEST 2017 (Stefan Seifert)
- Fix floating point related test failures on some machines.
-------------------------------------------------------------------
Wed Jul 5 05:40:56 UTC 2017 - coolo@suse.com
- updated to 0.55
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.55 Tue Jul 03 09:30:00 CEST 2017 (Stefan Seifert)
- Pass Python floats as floats to Perl, not as string.
-------------------------------------------------------------------
Wed Jun 14 05:44:10 UTC 2017 - coolo@suse.com
- updated to 0.54
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.54 Tue Jun 13 08:40:00 CEST 2017 (Stefan Seifert)
- Fix object stringification crashing on Perl < 5.16 (RT #122082)
-------------------------------------------------------------------
Fri Jun 9 05:51:43 UTC 2017 - coolo@suse.com
- updated to 0.53
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.53 Fri Jun 02 12:10:00 CEST 2017 (Stefan Seifert)
- Better support for serializing booleans with JSON
- Support calling Perl objects with overloaded code dereferencing
- Support overloaded stringification of Perl objects
-------------------------------------------------------------------
Fri Dec 2 06:36:50 UTC 2016 - coolo@suse.com
- updated to 0.52
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.52 Thu Dec 01 20:31:00 CET 2016 (Stefan Seifert)
- Fix test failing on lots of machines
by Linas Valiukas
-------------------------------------------------------------------
Fri Nov 11 06:39:48 UTC 2016 - coolo@suse.com
- updated to 0.51
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.51 Thu Nov 09 08:45:00 CET 2016 (Stefan Seifert)
- Fix memory leak when passing dict with Unicode keys to Perl
by Linas Valiukas
-------------------------------------------------------------------
Mon Jul 4 12:46:34 UTC 2016 - coolo@suse.com
- updated to 0.50
see /usr/share/doc/packages/perl-Inline-Python/Changes
0.50 Thu Jun 30 14:30:00 CEST 2016 (Stefan Seifert)
- Fix memory corruption after passing a dict with a non-string key to Perl
-------------------------------------------------------------------
Wed Sep 9 08:52:25 UTC 2015 - coolo@suse.com
- updated to 0.49
see /usr/share/doc/packages/perl-Inline-Python/Changes
-------------------------------------------------------------------
Wed Sep 9 08:52:23 UTC 2015 - coolo@suse.com
- updated to 0.40
see /usr/share/doc/packages/perl-Inline-Python/Changes
-------------------------------------------------------------------
Fri Apr 22 18:15:09 UTC 2011 - coolo@opensuse.org
- updated to 0.39
- Added py_is_tuple and made Pl2Py recognize an array ref that has
been a tuple before in Python.
- Fixed memory corruption on a Python function calling a Perl function
that changed the stack pointer.
- Fixed several memory leaks (scalars and dict keys).
- Fixed wrong refcount of return values in py_eval (RT #48081)
- Fixed accessing Unicode keys in a dict passed from Perl.
- Fixed compatability of t/30floats.t with Python 2.7.
- Fix Perl assertion fail if __getitem__ called multiple times
- Fix "Attempt to free unreferenced scalar" sometimes happening when
calling a Perl sub with named parameters from Python.
- Fix several memory leaks found using valgrind
- Add py_finalize to be able to shut down the Python interpreter.
- Added line numbers to Python exception messages.
- Fixed passing of a perl code ref through Python space.
- Allow passing references to methods from Python to Perl.
- Implemented py_has_attr complementing py_get_attr.
- We now support stringification of Python objects via __str__ methods.
- Fixed segfault when accessing a Python object's attributes throws an
exception.
- Fixed some problems with the test suite, hopefully making installation
work on more machines.
- Fixed compilation on Win32, linking still seems broken though :(
- Fixed a segfault when passing dicts with Unicode keys to Perl
- Pass Python exceptions to Perl instead of just printing to STDERR
-------------------------------------------------------------------
Wed Jun 2 23:33:09 UTC 2010 - jw@novell.com
- update to 0.35. Changelog since 0.3.0:
- Fixed floats sometimes getting converted to int when transfered from
Perl to Python. Thanks to John McCullough for a great bug report.
- Fixed refcounting of positional arguments in named argument calls to
Perl subs.
- Added support for named arguments for Perl subs
- Perl UTF-8 strings now get converted to Python Unicode strings and
vice versa. This could potentially lead to incompatibilities with
existing code.
- Return lists of Perl subs no longer get reversed before passing to
Python.
- Implement access to Inline::Python::Object data
-------------------------------------------------------------------
Thu Dec 3 23:33:12 UTC 2009 - jw@novell.com
- updated to 0.30, added make test, fixed dependencies,
added happy_gcc.patch
-------------------------------------------------------------------
* Wed Mar 22 2006 Dries Verachtert <dries@ulyssis.org> - 0.22-1.2
- Rebuild for Fedora Core 5.
* Fri Mar 4 2005 Dries Verachtert <dries@ulyssis.org> - 0.22-1
- Updated to release 0.22.
* Wed Dec 29 2004 Dries Verachtert <dries@ulyssis.org> - 0.21-1
- Updated to release 0.21.
* Thu Jul 22 2004 Dries Verachtert <dries@ulyssis.org> - 0.20-1
- Initial package.

76
perl-Inline-Python.spec Normal file
View File

@@ -0,0 +1,76 @@
#
# spec file for package perl-Inline-Python
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%define cpan_name Inline-Python
Name: perl-Inline-Python
Version: 0.57
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Write Perl subs and classes in Python
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/N/NI/NINE/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
Patch0: initperl_prototype.diff
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Digest::MD5) >= 2.5
BuildRequires: perl(Inline) >= 0.46
BuildRequires: perl(Proc::ProcessTable) >= 0.53
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::Number::Delta)
Requires: perl(Digest::MD5) >= 2.5
Requires: perl(Inline) >= 0.46
%{perl_requires}
# MANUAL BEGIN
BuildRequires: python3-devel
BuildRequires: perl(Parse::RecDescent)
# MANUAL END
%description
The 'Inline::Python' module allows you to put Python source code directly
"inline" in a Perl script or module. It sets up an in-process Python
interpreter, runs your code, and then examines Python's symbol table for
things to bind to Perl. The process of interrogating the Python interpreter
for globals only occurs the first time you run your Python code. The
namespace is cached, and subsequent calls use the cached version.
This document describes 'Inline::Python', the Perl package which gives you
access to a Python interpreter. For lack of a better place to keep it, it
also gives you instructions on how to use 'perlmodule', the Python package
which gives you access to the Perl interpreter.
%prep
%autosetup -n %{cpan_name}-%{version} -p1
%build
export INLINE_PYTHON_EXECUTABLE=/usr/bin/python3
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README TESTED ToDo
%changelog