File python-jpy.spec of Package python-jpy

#
# spec file for package python-jpy
#
# Copyright (c) 2023 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/
#


%{?sle15_python_module_pythons}
Name:           python-jpy
Version:        0.13.0
Release:        0
Summary:        Bi-directional Python-Java bridge
License:        Apache-2.0
URL:            https://github.com/jpy-consortium/jpy
Source:         https://files.pythonhosted.org/packages/source/j/jpy/jpy-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  java-11-openjdk-headless
BuildRequires:  java-11-openjdk-devel
BuildRequires:  maven
BuildRequires:  maven-wagon-ssh
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module jpyutils}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
# SECTION test requirements
BuildRequires:  %{python_module pytest}
# /SECTION
BuildRequires:  fdupes
%python_subpackages

%description
jpy - a Python-Java Bridge

jpy is a **bi-directional** Python-Java bridge which you can use to embed Java
code in Python programs or the other way round. It has been designed
particularly with regard to maximum data transfer speed between the two
languages.  It comes with a number of outstanding features:

* Fully translates Java class hierarchies to Python
* Transparently handles Java method overloading
* Support of Java multi-threading
* Fast and memory-efficient support of primitive Java array parameters via
  [Python buffers](http://docs.python.org/3.3/c-api/buffer.html)
  (e.g. [Numpy arrays](http://docs.scipy.org/doc/numpy/reference/arrays.html))
* Support of Java methods that modify primitive Java array parameters (mutable
  parameters)
* Java arrays translate into Python sequence objects
* Java API for accessing Python objects (`jpy.jar`)


%prep
%autosetup -p1 -n jpy-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%files %{python_files}
%doc CHANGES.md README.md
%license LICENSE.txt
%{python_sitearch}/jpyutil.py
%{python_sitearch}/jdl.cpython-%{python_version_nodots}-x86_64-linux-gnu.so
%{python_sitearch}/jpy.cpython-%{python_version_nodots}-x86_64-linux-gnu.so
%{python_sitearch}/jpy-%{version}.dist-info
%pycache_only %{python_sitearch}/__pycache__

%changelog
openSUSE Build Service is sponsored by