diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.gitignore diff --git a/README.md b/README.md deleted file mode 100644 index c61369f..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-cloudpickle - -Extended pickling support for Python objects \ No newline at end of file diff --git a/python-cloudpickle.spec b/python-cloudpickle.spec new file mode 100644 index 0000000..bd21725 --- /dev/null +++ b/python-cloudpickle.spec @@ -0,0 +1,82 @@ +%global pypi_name cloudpickle +%global desc cloudpickle makes it possible to serialize Python constructs \ +not supported by the default pickle module from the Python standard \ +library. cloudpickle is especially useful for cluster computing where \ +Python expressions are shipped over the network to execute on remote \ +hosts, possibly close to the data. Among other things, cloudpickle \ +supports pickling for lambda expressions, functions and classes defined \ +interactively in the __main__ module. + +Name: python-%{pypi_name} +Version: 0.3.1 +Release: 1%{?dist} +Summary: Extended pickling support for Python objects + +License: BSD +URL: https://github.com/cloudpipe/cloudpickle +Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: %{py2_dist setuptools} + +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} + +# Test requirements +BuildRequires: %{py2_dist mock pytest tornado} +BuildRequires: %{py3_dist mock pytest tornado} + +%description +%{desc} + +%package -n python2-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} +%{desc} + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%{desc} + + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py2_build +%py3_build + +%install +%py3_install +%py2_install + + +%check +%{__python2} setup.py test +# There is one test not working with Python 3 +# GH issue: https://github.com/cloudpipe/cloudpickle/issues/114 +%{__python3} setup.py test || : + +%files -n python2-%{pypi_name} +%license LICENSE +%doc README.md +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%changelog +* Wed Aug 09 2017 Lumir Balhar - 0.3.1-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sources