Files
python-pyjnius/python-pyjnius.spec

74 lines
2.2 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-pyjnius
#
# 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-pyjnius
Version: 1.5.0
Release: 0
Summary: Access Java classes from Python
License: MIT
Group: Development/Languages/Python
URL: https://github.com/kivy/pyjnius
Source: https://github.com/kivy/pyjnius/archive/%{version}.tar.gz#/pyjnius-%{version}.tar.gz
BuildRequires: %{python_module Cython with %python-Cython < 3}
BuildRequires: %{python_module setuptools}
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel
BuildRequires: python-rpm-macros
Requires: python-Cython
# SECTION test requirements
BuildRequires: %{python_module pytest}
BuildRequires: javapackages-local
# /SECTION
%python_subpackages
%description
Access Java classes from Python.
%prep
%setup -q -n pyjnius-%{version}
Accepting request 957593 from home:pgajdos:python - version update to 1.4.1 **Implemented enhancements:** - [\#542](https://github.com/kivy/pyjnius/pull/542) Improve performance of byte array parameters - [\#515](https://github.com/kivy/pyjnius/pull/515) Allow passing Python Lambdas as Java lambdas - [\#541](https://github.com/kivy/pyjnius/pull/541) Refactor of env.py **Fixed bugs:** - [\#549](https://github.com/kivy/pyjnius/pull/549) Fixes #548 JVM options are not correctly set by jnius_config.set_options() - [\#546](https://github.com/kivy/pyjnius/pull/546) Add in missing assignable check for int parameters etc. - [\#558](https://github.com/kivy/pyjnius/pull/558) Improve error message on method not found - [\#567](https://github.com/kivy/pyjnius/pull/567) Fix static methods - [\#566](https://github.com/kivy/pyjnius/pull/566) fix bug for constuctors with variable arguments - [\#569](https://github.com/kivy/pyjnius/pull/569) set_resolve_info: replace j_self w/ resolve_static - [\#595](https://github.com/kivy/pyjnius/pull/595) Use Python standard library `which` instead of OS `which` **Documentation** - [\#556](https://github.com/kivy/pyjnius/pull/556) fix link in readme - [\#572](https://github.com/kivy/pyjnius/pull/572) update readme for python3 - [\#584](https://github.com/kivy/pyjnius/pull/584) Updated android.rst for python3 - [\#565](https://github.com/kivy/pyjnius/pull/565) Update python versions OBS-URL: https://build.opensuse.org/request/show/957593 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjnius?expand=0&rev=6
2022-02-26 10:12:12 +00:00
sed -i 's:python:python3:' tests/test_jvm_options.py
%build
export CFLAGS="%{optflags}"
%python_build
ant jar test-compile
Accepting request 957593 from home:pgajdos:python - version update to 1.4.1 **Implemented enhancements:** - [\#542](https://github.com/kivy/pyjnius/pull/542) Improve performance of byte array parameters - [\#515](https://github.com/kivy/pyjnius/pull/515) Allow passing Python Lambdas as Java lambdas - [\#541](https://github.com/kivy/pyjnius/pull/541) Refactor of env.py **Fixed bugs:** - [\#549](https://github.com/kivy/pyjnius/pull/549) Fixes #548 JVM options are not correctly set by jnius_config.set_options() - [\#546](https://github.com/kivy/pyjnius/pull/546) Add in missing assignable check for int parameters etc. - [\#558](https://github.com/kivy/pyjnius/pull/558) Improve error message on method not found - [\#567](https://github.com/kivy/pyjnius/pull/567) Fix static methods - [\#566](https://github.com/kivy/pyjnius/pull/566) fix bug for constuctors with variable arguments - [\#569](https://github.com/kivy/pyjnius/pull/569) set_resolve_info: replace j_self w/ resolve_static - [\#595](https://github.com/kivy/pyjnius/pull/595) Use Python standard library `which` instead of OS `which` **Documentation** - [\#556](https://github.com/kivy/pyjnius/pull/556) fix link in readme - [\#572](https://github.com/kivy/pyjnius/pull/572) update readme for python3 - [\#584](https://github.com/kivy/pyjnius/pull/584) Updated android.rst for python3 - [\#565](https://github.com/kivy/pyjnius/pull/565) Update python versions OBS-URL: https://build.opensuse.org/request/show/957593 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjnius?expand=0&rev=6
2022-02-26 10:12:12 +00:00
mv build/test-classes tests
%install
%python_install
%{python_expand rm -f %{buildroot}%{$python_sitearch}/setup_sdist.py %{buildroot}%{$python_sitearch}/__pycache__/setup_sdist.*
%fdupes %{buildroot}%{$python_sitearch}
}
%check
Accepting request 957593 from home:pgajdos:python - version update to 1.4.1 **Implemented enhancements:** - [\#542](https://github.com/kivy/pyjnius/pull/542) Improve performance of byte array parameters - [\#515](https://github.com/kivy/pyjnius/pull/515) Allow passing Python Lambdas as Java lambdas - [\#541](https://github.com/kivy/pyjnius/pull/541) Refactor of env.py **Fixed bugs:** - [\#549](https://github.com/kivy/pyjnius/pull/549) Fixes #548 JVM options are not correctly set by jnius_config.set_options() - [\#546](https://github.com/kivy/pyjnius/pull/546) Add in missing assignable check for int parameters etc. - [\#558](https://github.com/kivy/pyjnius/pull/558) Improve error message on method not found - [\#567](https://github.com/kivy/pyjnius/pull/567) Fix static methods - [\#566](https://github.com/kivy/pyjnius/pull/566) fix bug for constuctors with variable arguments - [\#569](https://github.com/kivy/pyjnius/pull/569) set_resolve_info: replace j_self w/ resolve_static - [\#595](https://github.com/kivy/pyjnius/pull/595) Use Python standard library `which` instead of OS `which` **Documentation** - [\#556](https://github.com/kivy/pyjnius/pull/556) fix link in readme - [\#572](https://github.com/kivy/pyjnius/pull/572) update readme for python3 - [\#584](https://github.com/kivy/pyjnius/pull/584) Updated android.rst for python3 - [\#565](https://github.com/kivy/pyjnius/pull/565) Update python versions OBS-URL: https://build.opensuse.org/request/show/957593 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjnius?expand=0&rev=6
2022-02-26 10:12:12 +00:00
mv jnius jnius.hide
%{python_expand export CLASSPATH="${PWD}/tests/test-classes:${PWD}/jnius.hide/src"
export PYTHONPATH=${PWD}:%{buildroot}%{$python_sitearch}
Accepting request 957593 from home:pgajdos:python - version update to 1.4.1 **Implemented enhancements:** - [\#542](https://github.com/kivy/pyjnius/pull/542) Improve performance of byte array parameters - [\#515](https://github.com/kivy/pyjnius/pull/515) Allow passing Python Lambdas as Java lambdas - [\#541](https://github.com/kivy/pyjnius/pull/541) Refactor of env.py **Fixed bugs:** - [\#549](https://github.com/kivy/pyjnius/pull/549) Fixes #548 JVM options are not correctly set by jnius_config.set_options() - [\#546](https://github.com/kivy/pyjnius/pull/546) Add in missing assignable check for int parameters etc. - [\#558](https://github.com/kivy/pyjnius/pull/558) Improve error message on method not found - [\#567](https://github.com/kivy/pyjnius/pull/567) Fix static methods - [\#566](https://github.com/kivy/pyjnius/pull/566) fix bug for constuctors with variable arguments - [\#569](https://github.com/kivy/pyjnius/pull/569) set_resolve_info: replace j_self w/ resolve_static - [\#595](https://github.com/kivy/pyjnius/pull/595) Use Python standard library `which` instead of OS `which` **Documentation** - [\#556](https://github.com/kivy/pyjnius/pull/556) fix link in readme - [\#572](https://github.com/kivy/pyjnius/pull/572) update readme for python3 - [\#584](https://github.com/kivy/pyjnius/pull/584) Updated android.rst for python3 - [\#565](https://github.com/kivy/pyjnius/pull/565) Update python versions OBS-URL: https://build.opensuse.org/request/show/957593 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjnius?expand=0&rev=6
2022-02-26 10:12:12 +00:00
# https://github.com/kivy/pyjnius/issues/617
$python -m pytest -k 'not test_jvm_options'
}
%files %{python_files}
%doc README.md CHANGELOG.md
%license LICENSE
%{python_sitearch}/*
%changelog