# Created by pyp2rpm-1.0.1 %global pypi_name py4j %global with_python3 1 Name: python-py4j Version: 0.8.1 Release: %mkrel 7 Group: Development/Python Summary: Enables Python programs to dynamically access arbitrary Java objects License: BSD URL: TODO: Source0: https://pypi.python.org/packages/source/p/py4j/py4j-%{version}.tar.gz BuildArch: noarch BuildRequires: java-devel BuildRequires: ant-junit BuildRequires: python-devel Requires: py4j-jar %if %{?with_python3} BuildRequires: python3-devel %endif # if with_python3 %description Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections can be accessed through standard Python collection methods. %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: Enables Python programs to dynamically access arbitrary Java objects Requires: py4j-jar %description -n python3-%{pypi_name} Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections can be accessed through standard Python collection methods. %endif # with_python3 %package -n py4j-jar Summary: JAR file for py4j-jar %description -n py4j-jar JAR file for py4j. %prep %setup -q -n %{pypi_name}-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %endif # with_python3 %build %{__python} setup.py build cd py4j-java ant jar %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install (and we want the python2 version # to be the default for now). %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %{__python} setup.py install --skip-build --root %{buildroot} mkdir -p %{buildroot}%{_javadir} mv %{buildroot}%{_datadir}/py4j %{buildroot}%{_javadir} pushd %{buildroot}%{_javadir} ln -s py4j/py4j%{version}.jar py4j%{version}.jar ln -s py4j/py4j%{version}.jar py4j.jar popd %files %doc py4j-java/README.txt README.txt LICENSE.txt py4j-java/LICENSE.txt %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc py4j-java/README.txt README.txt LICENSE.txt py4j-java/LICENSE.txt %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif # with_python3 %files -n py4j-jar %{_javadir}/py4j/py4j%{version}.jar %{_javadir}/py4j%{version}.jar %{_javadir}/py4j.jar %changelog * Fri Feb 19 2016 umeabot <umeabot> 0.8.1-7.mga6 + Revision: 970942 - Mageia 6 Mass Rebuild * Sat Oct 10 2015 tv <tv> 0.8.1-6.mga6 + Revision: 888828 - rebuild for python 3.5 * Wed Oct 15 2014 umeabot <umeabot> 0.8.1-5.mga5 + Revision: 746592 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 0.8.1-4.mga5 + Revision: 729358 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 0.8.1-3.mga5 + Revision: 688232 - Mageia 5 Mass Rebuild * Sat Jun 28 2014 joequant <joequant> 0.8.1-2.mga5 + Revision: 640555 - symlink java jars * Fri Jun 27 2014 joequant <joequant> 0.8.1-1.mga5 + Revision: 640415 - ant junit - add junit - imported package python-py4j