fe13b9a
%global modname jnius
fe13b9a
%global srcname py%{modname}
fe13b9a
%global sum     Dynamic access to Java classes from Python
fe13b9a
fe13b9a
fe13b9a
Name:           python-%{modname}
9659650
Version:        1.3.0
d57f802
Release:        6%{?dist}
fe13b9a
Summary:        %{sum}
fe13b9a
fe13b9a
License:        MIT
fe13b9a
URL:            https://github.com/kivy/%{srcname}
fe13b9a
Source0:        %{url}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
fe13b9a
c963493
BuildRequires: make
38c6642
BuildRequires:  gcc
6506b49
fe13b9a
BuildRequires:  python3-devel
fe13b9a
BuildRequires:  python3-Cython
7b5722a
BuildRequires:  python3-six
6506b49
BuildRequires:  python3-pytest
6506b49
fe13b9a
BuildRequires:  ant
fe13b9a
BuildRequires:  java-devel
6506b49
72cd870
BuildRequires:  %{_bindir}/sphinx-build-3
fe13b9a
fe13b9a
# FIXME odd bug with wrong default architecture (i386)
fe13b9a
# https://github.com/kivy/pyjnius/issues/307
fe13b9a
# https://github.com/kivy/pyjnius/issues/306
fe13b9a
ExcludeArch:    i686 ppc64 ppc64le s390x armv7hl aarch64
fe13b9a
fe13b9a
%description
fe13b9a
%{summary}.
fe13b9a
fe13b9a
%package     -n python3-%{srcname}
fe13b9a
Summary:        %{sum}
fe13b9a
Requires:       java-headless
7b5722a
Requires:       python3-six
fe13b9a
%{?python_provide:%python_provide python3-%{srcname}}
fe13b9a
Provides:       python3-%{modname}
fe13b9a
fe13b9a
fe13b9a
%description -n python3-%{srcname}
fe13b9a
%{summary}.
fe13b9a
fe13b9a
%package        doc
fe13b9a
Summary:        Documentation files for %{srcname}
fe13b9a
BuildArch:      noarch
fe13b9a
fe13b9a
%description    doc
fe13b9a
%{summary}.
fe13b9a
fe13b9a
fe13b9a
%prep
7b5722a
%autosetup -p1 -n %{srcname}-%{version}
fe13b9a
fe13b9a
72cd870
%build
7b5722a
%py3_build
fe13b9a
4a7cd2c
make %{_smp_mflags} -C docs SPHINXBUILD='sphinx-build-3 %{_smp_mflags}' html
fe13b9a
7b5722a
# build java classes for tests
7b5722a
# there is also Makefile, but it calls python setup.py build_ext --inplace
7b5722a
# together with ant, so we don't use it not to build python bits twice
7b5722a
ant all
fe13b9a
fe13b9a
7b5722a
%install
72cd870
%py3_install
72cd870
fe13b9a
fe13b9a
%check
7b5722a
pushd tests
7b5722a
export CLASSPATH=../build/test-classes:../build/classes
fe13b9a
export JAVA_HOME=%{_prefix}/lib/jvm/java
18f0ae1
PYTHONPATH=%{buildroot}%{python3_sitearch} pytest -v
fe13b9a
popd
fe13b9a
fe13b9a
fe13b9a
%files -n python3-%{srcname}
fe13b9a
%license LICENSE
fe13b9a
%doc *.md
fe13b9a
%{python3_sitearch}/%{modname}/
fe13b9a
%{python3_sitearch}/%{modname}_config.py*
fe13b9a
%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info/
fe13b9a
%{python3_sitearch}/__pycache__/%{modname}_config.cpython-*.pyc
fe13b9a
%exclude %{python3_sitearch}/__pycache__
18f0ae1
%exclude %{python3_sitearch}/setup_sdist.py
fe13b9a
fe13b9a
%files doc
fe13b9a
%license LICENSE
fe13b9a
%doc docs/build/html/
fe13b9a
fe13b9a
fe13b9a
%changelog
d57f802
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-6
d57f802
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d57f802
18f0ae1
* Thu Oct 01 2020 Raphael Groner <raphgro@fedoraproject.org> - 1.3.0-5
18f0ae1
- use pytest instead of nose as upstream decided, see changes in Makefile
18f0ae1
- skip useless additional setup
18f0ae1
c09be09
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
c09be09
- Second attempt - Rebuilt for
c09be09
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c09be09
cfcfb04
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
cfcfb04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cfcfb04
85f2ea8
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 1.3.0-2
85f2ea8
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
85f2ea8
9659650
* Sat Jun 06 2020 Raphael Groner <raphgro@fedoraproject.org> - 1.3.0-1
9659650
- bump to v1.3.0 
9659650
02c50a7
* Sat Jun 06 2020 Raphael Groner <raphgro@fedoraproject.org> - 1.2.0-6
02c50a7
- rebuilt
02c50a7
1b1bf9d
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-5
1b1bf9d
- Rebuilt for Python 3.9
1b1bf9d
cc3dec3
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
cc3dec3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cc3dec3
8132c58
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-3
8132c58
- Rebuilt for Python 3.8.0rc1 (#1748018)
8132c58
e09a132
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-2
e09a132
- Rebuilt for Python 3.8
e09a132
9f9dc1e
* Mon Jul 29 2019 Raphael Groner <projects.rg@smart.ms> - 1.2.0-1
9f9dc1e
- new version
9f9dc1e
c83144e
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-3
c83144e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c83144e
52553f5
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-2
52553f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
52553f5
4a7cd2c
* Thu Dec 13 2018 Raphael Groner <projects.rg@smart.ms> - 1.1.4-1
4a7cd2c
- new version
4a7cd2c
72cd870
* Mon Nov 12 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-7
72cd870
- Subpackage python2-pyjnius has been removed
72cd870
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
72cd870
7b5722a
* Wed Jul 18 2018 Raphael Groner <projects.rg@smart.ms> - 1.1.1-6
7b5722a
- several fixes for Python
7b5722a
fd1a47a
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-5
7b5722a
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
fd1a47a
0f4abdf
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-4
0f4abdf
- Rebuilt for Python 3.7
0f4abdf
335e455
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
335e455
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
335e455
fe13b9a
* Tue Oct 24 2017 Raphael Groner <projects.rg@smart.ms> - 1.1.1-2
fe13b9a
- be more precisely about owned files
fe13b9a
fe13b9a
* Sun Oct 22 2017 Raphael Groner <projects.rg@smart.ms> - 1.1.1-1
fe13b9a
- initial