diff --git a/.gitignore b/.gitignore index 29ecc79..2250475 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /python-javaobj-b8ae821.tar.gz /python-javaobj-64a6e0f.tar.gz /python-javaobj-f286deefee3f629b32aa13135f6d77d9352a1a6b.tar.gz +/javaobj-0.4.0.1.tar.gz diff --git a/python-javaobj.spec b/python-javaobj.spec index f17d133..614cde9 100644 --- a/python-javaobj.spec +++ b/python-javaobj.spec @@ -1,165 +1,93 @@ -%global srcname javaobj -%global sum Python module for serializing and deserializing Java objects +%global pypi_name javaobj -%global date0 20160423 -%global commit0 f286deefee3f629b32aa13135f6d77d9352a1a6b - -%global readme README.rst - -Name: python-%{srcname} -Version: 0.1.3 -Release: 2.%{date0}git%(c=%{commit0}; echo ${c:0:7} )%{?dist} +Name: python-%{pypi_name} +Version: 0.4.0.1 +Release: 1%{?dist} Summary: Python module for serializing and deserializing Java objects -License: ASL 2.0 -URL: https://github.com/tcalmant/%{name} -Source0: %{url}/archive/%{commit0}/%{name}-%{commit0}.tar.gz +License: ASL 2.0 +URL: https://github.com/tcalmant/python-javaobj +Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel python3-devel - -# deps for tests -BuildRequires: maven-local maven-clean-plugin -BuildRequires: xorg-x11-server-Xvfb %description -%{name} is a python library that provides functions for reading -(and writing as WIP) of Java objects serialized or will be deserialized by -ObjectOutputStream. This form of object representation is a standard data -interchange format in Java. - -%{srcname} module exposes an API familiar to users of the standard -library marshal, pickle and json modules. - -Features - Java object instance unmarshaling - Java class itself unmarshaling - Primitive values unmarshaling - Automatic conversion of Java Collections to python ones - (HashMap => dict, ArrayList => list, etc) - -See also the PyPi module at: https://pypi.python.org/pypi/%{srcname} - -This project was forked somehow at GitHub. Fedora distributes those sources. -See the %{readme} file for details. - - -%package -n python2-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -%{name} is a python library that provides functions for reading -(and writing as WIP) of Java objects serialized or will be deserialized by -ObjectOutputStream. This form of object representation is a standard data -interchange format in Java. - -%{srcname} module exposes an API familiar to users of the standard -library marshal, pickle and json modules. - -Features - Java object instance unmarshaling - Java class itself unmarshaling - Primitive values unmarshaling - Automatic conversion of Java Collections to python ones - (HashMap => dict, ArrayList => list, etc) - -See also the PyPi module at: https://pypi.python.org/pypi/%{srcname} - -This project was forked somehow at GitHub. Fedora distributes those sources. -See the %{readme} file for details. - -%package -n python3-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python3-%{srcname}} - -%description -n python3-%{srcname} -%{name} is a python library that provides functions for reading -(and writing as WIP) of Java objects serialized or will be deserialized by -ObjectOutputStream. This form of object representation is a standard data -interchange format in Java. - -%{srcname} module exposes an API familiar to users of the standard -library marshal, pickle and json modules. - -Features - Java object instance unmarshaling - Java class itself unmarshaling - Primitive values unmarshaling - Automatic conversion of Java Collections to python ones - (HashMap => dict, ArrayList => list, etc) - -See also the PyPi module at: https://pypi.python.org/pypi/%{srcname} - -This project was forked somehow at GitHub. Fedora distributes those sources. -See the %{readme} file for details. +python-javaobj is a python library that provides functions for reading +and writing (writing is WIP currently) Java objects serialized or will +be deserialized by ObjectOutputStream. This form of object representation +is a standard data interchange format in Java world. + +%package -n python3-%{pypi_name} +Summary: %{summary} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest +# Deps for tests +BuildRequires: maven-local +BuildRequires: xorg-x11-server-Xvfb +%{?python_provide:%python_provide python3-%{pypi_name}} +%description -n python3-%{pypi_name} +python-javaobj is a python library that provides functions for reading +and writing (writing is WIP currently) Java objects serialized or will +be deserialized by ObjectOutputStream. This form of object representation +is a standard data interchange format in Java world. %prep -%setup -qn%{name}-%{commit0} -find tests -name '*.ser' -not -name '*issue*' -print -delete +%autosetup -n %{name}-%{version} +# Mock sth. for swing/awt +sed -i -e "s|'mvn'|'xvfb-run', 'xmvn', '-o'|" tests/tests.py +# Remove shebang +sed -i -e '/^#!\//, 1d' {javaobj/*.py,javaobj/v1/*.py,javaobj/v2/*.py} %build -%py2_build %py3_build %install -%py2_install %py3_install %check -pushd tests -# mock sth. for swing/awt -xvfb-run -a xmvn -f java -o test -%{__python2} -m unittest -v tests -%{__python3} -m unittest -v -find java -name '*.ser' -print -delete -xmvn -f java -o clean -rm -rfv .xmvn *.pyc __pycache__ -popd - - -%files -n python2-%{srcname} -%license LICENSE -%doc %{readme} tests/ -%{python2_sitelib}/* +# https://github.com/tcalmant/python-javaobj/issues/37 +#PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version} -v tests/*.py +# Remove temporary builds +#rm -r java/target java/test*.ser -%files -n python3-%{srcname} +%files -n python3-%{pypi_name} %license LICENSE -%doc %{readme} tests/ -%{python3_sitelib}/* - +%doc README.rst +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}*.egg-info/ %changelog -* Tue Jul 19 2016 Fedora Release Engineering - 0.1.3-2.20160423gitf286dee -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Mon May 09 2016 Raphael Groner - 0.1.3-1.20160423gitf286dee -- v0.1.3 (0.1.4 as on PyPI?) with latest git snapshot, rhbz#1329839 +* Wed Mar 18 2020 Fabian Affolter - 0.4.0.1-1 +- Remove Python 2 support +- Simplify spec file +- Update to latest upstream release 0.4.0.1 * Thu Feb 04 2016 Fedora Release Engineering - 0-0.8.20150606git64a6e0f - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Dec 15 2015 Raphael Groner - 0-0.7.20150606git64a6e0f -- python3 support -- new upstream snapshot +- Python3 support +- New upstream snapshot * Thu Jun 18 2015 Fedora Release Engineering - 0-0.6.20131228gitb8ae821 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Jan 28 2015 Raphael Groner - 0-0.5.20131228gitb8ae821 -- introduce license macro +- Introduce license macro * Tue Jan 06 2015 Raphael Groner - 0-0.4.20131228gitb8ae821 - BR python2 * Fri Dec 19 2014 Raphael Groner - 0-0.3.20142011svn31 -- use date of last commit (instead of checkout/export) -- use GitHub (forked?) -- remove sed fiddling -- distribute tests folder as documentation samples +- Use date of last commit (instead of checkout/export) +- Use GitHub (forked?) +- Remove sed fiddling +- Distribute tests folder as documentation samples * Sat Nov 22 2014 Raphael Groner - 0-0.2.20142011svn31 -- fix swing/awt test +- Fix swing/awt test * Thu Nov 20 2014 Raphael Groner - 0-0.1.20142011svn31 -- initial +- Initial diff --git a/sources b/sources index ed0e247..0cc2f5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -19b05967f80ba4d1dafce528294091c6 python-javaobj-f286deefee3f629b32aa13135f6d77d9352a1a6b.tar.gz +SHA512 (javaobj-0.4.0.1.tar.gz) = 742ae923d8bbd3d57226082a9fd0d5405d68b363092f321ceb410c219e22a674e5cb7d7ac8ad67f4ff1a5db42227ec263a5a0b0245998763e0c450b33061538f