425a846
%if (! 0%{?rhel}) || 0%{?rhel} > 6
425a846
%global with_python3 1
425a846
%global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
425a846
%endif
425a846
%if 0%{?rhel} && 0%{?rhel} < 6
425a846
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
425a846
%endif
112da91
112da91
%global srcname execnet
112da91
112da91
Name:           python-%{srcname}
425a846
Version:        1.0.9
708a399
Release:        3%{?dist}
112da91
Summary:        Elastic Python Deployment
112da91
Group:          Development/Languages
112da91
License:        GPLv2+ and MIT
112da91
URL:            http://codespeak.net/execnet
425a846
Source0:        http://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.zip
708a399
# upstream changeset 1a63deea3424
708a399
Patch0:         execnet-debugfilename.patch
112da91
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
112da91
BuildArch:      noarch
112da91
BuildRequires:  python-devel
425a846
BuildRequires:  python-setuptools
425a846
Requires:       python-setuptools
425a846
BuildRequires:  pytest
112da91
BuildRequires:  python-sphinx
708a399
BuildRequires:  /bin/ps
425a846
%if 0%{?with_python3}
425a846
BuildRequires:  python3-devel
425a846
BuildRequires:  python3-setuptools
425a846
BuildRequires:  python3-pytest
425a846
%endif # with_python3
112da91
# execnet was separated from pylib at that point
112da91
Conflicts:      python-py < 1.1.0
112da91
112da91
112da91
%description
112da91
The execnet package allows to:
112da91
112da91
 * instantiate local/remote Python Interpreters
112da91
 * send code for execution to one or many Interpreters
112da91
 * send and receive data between codeInterpreters through channels
112da91
112da91
execnet performs zero-install bootstrapping into other interpreters;
112da91
package installation is only required at the initiating side. execnet
112da91
enables interoperation between CPython 2.4-3.1, Jython 2.5 and PyPy
112da91
1.1 and works well on Windows, Linux and OSX systems.
112da91
112da91
425a846
%if 0%{?with_python3}
425a846
%package -n python3-execnet
425a846
Summary:        Elastic Python Deployment
425a846
Group:          Development/Languages
425a846
Requires:       python3-setuptools
425a846
425a846
425a846
%description -n python3-execnet
425a846
The execnet package allows to:
425a846
425a846
 * instantiate local/remote Python Interpreters
425a846
 * send code for execution to one or many Interpreters
425a846
 * send and receive data between codeInterpreters through channels
425a846
425a846
execnet performs zero-install bootstrapping into other interpreters;
425a846
package installation is only required at the initiating side. execnet
425a846
enables interoperation between CPython 2.4-3.1, Jython 2.5 and PyPy
425a846
1.1 and works well on Windows, Linux and OSX systems.
425a846
%endif # with_python3
425a846
425a846
112da91
%prep
425a846
%setup -q -n %{srcname}-%{version}
708a399
%patch0 -p1
112da91
77f668c
# remove shebangs and fix permissions
77f668c
find . -type f -a \( -name '*.py' -o -name 'py.*' \) \
77f668c
   -exec sed -i '1{/^#!/d}' {} \; \
77f668c
   -exec chmod u=rw,go=r {} \;
77f668c
425a846
%if 0%{?with_python3}
425a846
cp -a . %{py3dir}
425a846
%endif # with_python3
425a846
112da91
112da91
%build
112da91
%{__python} setup.py build
112da91
make -C doc html
112da91
425a846
%if 0%{?with_python3}
425a846
pushd %{py3dir}
425a846
%{__python3} setup.py build
425a846
popd
425a846
%endif # with_python3
425a846
112da91
112da91
%install
112da91
rm -rf %{buildroot}
112da91
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
112da91
425a846
%if 0%{?with_python3}
425a846
pushd %{py3dir}
425a846
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
425a846
popd
425a846
%endif # with_python3
425a846
112da91
# remove hidden file
112da91
rm doc/_build/html/.buildinfo
112da91
112da91
112da91
%check
74eda5a
PYTHONPATH=$(pwd) py.test-%{python_version} -r s
425a846
%if 0%{?with_python3}
425a846
pushd %{py3dir}
74eda5a
# see http://bugs.python.org/issue12591
74eda5a
PYTHONPATH=$(pwd) py.test-%{python3_version} -r s -k-test_subprocess_interaction
425a846
popd
425a846
%endif # with_python3
425a846
112da91
112da91
%clean
112da91
rm -rf %{buildroot}
112da91
112da91
112da91
%files
112da91
%defattr(-,root,root,-)
112da91
%{python_sitelib}/%{srcname}*
112da91
%doc README.txt LICENSE CHANGELOG
112da91
%doc doc/_build/html
112da91
112da91
425a846
%if 0%{?with_python3}
425a846
%files -n python3-execnet
425a846
%defattr(-,root,root,-)
425a846
%{python3_sitelib}/%{srcname}*
425a846
%doc README.txt LICENSE CHANGELOG
425a846
%doc doc/_build/html
425a846
%endif # with_python3
425a846
425a846
112da91
%changelog
708a399
* Tue Jan 17 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.9-3
708a399
- Add upstream patch for failing test.
708a399
982e9ca
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
982e9ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
982e9ca
425a846
* Sun Sep  4 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.9-1
425a846
- Update to 1.0.9.
425a846
- Use BR on python-setuptools instead of python-setuptools-devel.
425a846
- Create Python3 subpackage.
425a846
- Fix dependencies.
425a846
99d284a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-1.1
99d284a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
99d284a
47f74d9
* Sat Jul 31 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.8-1
47f74d9
- Update to 1.0.8.
47f74d9
83a8545
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.7-1.1
83a8545
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
83a8545
77f668c
* Sat Jul 10 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.7-1
77f668c
- Update to 1.0.7.
77f668c
- Do cleanups already in %%prep to avoid inconsistent mtimes between
77f668c
  source files and bytecode.
77f668c
2641d2e
* Sat May  8 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.6-1
2641d2e
- Update to 1.0.6.
2641d2e
ded90d7
* Sun Feb 14 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.5-1
ded90d7
- Update to 1.0.5.
ded90d7
c248db5
* Wed Jan 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.4-1
c248db5
- Update to 1.0.4.
c248db5
- No need to skip tests.
c248db5
112da91
* Fri Jan  8 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.2-3
112da91
- Remove .buildinfo file from the doc dir.
112da91
112da91
* Thu Jan  7 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.2-2
112da91
- Skip tests that need network access.
112da91
112da91
* Tue Dec 29 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.2-1
112da91
- Update to 1.0.2.
112da91
112da91
* Sat Dec  5 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.1-1
112da91
- Update to 1.0.1.
112da91
- Build and include HTML documentation.
112da91
- Be a bit more explicit in the %%files section.
112da91
112da91
* Sat Nov 28 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-1
112da91
- Update to 1.0.0.
112da91
112da91
* Sun Nov 22 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-0.1.b3
112da91
- New package.