# Created by pyp2rpm-3.0.2 %global pypi_name seesaw Name: python-%{pypi_name} Version: 0.9.2 Release: 2%{?dist} Summary: ArchiveTeam seesaw kit # seesaw is under WTFPL # js-jquery, js-sockjs and js-smoothie are under MIT # reset.css is under Public Domain. License: WTFPL and MIT and Public Domain URL: http://www.archiveteam.org/ Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz # Unbundle python-six. Patch0: https://tc01.fedorapeople.org/seesaw/python-seesaw-unbundle-six.patch BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python2-nose BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-nose # For unit tests. BuildRequires: python2-sockjs-tornado, python3-sockjs-tornado # Bundled provides for stuff. Provides: bundled(js-jquery) = 1.7.2 Provides: bundled(js-smoothie) = 1.9 Provides: bundled(js-sockjs) = 0.3 Provides: bundled(reset-css) = 2.0 %description An asynchronous toolkit for distributed web processing. Written in Python and named after its behavior, it supports concurrent downloads, uploads, etc. This toolkit is well-known for Archive Team projects. It also powers the ArchiveTeam warrior. %package -n python2-%{pypi_name} Summary: ArchiveTeam seesaw kit %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python-tornado >= 4 Requires: python-tornado < 4.5 Requires: python2-sockjs-tornado Requires: python2-six #Requires: js-jquery %description -n python2-%{pypi_name} An asynchronous toolkit for distributed web processing. Written in Python and named after its behavior, it supports concurrent downloads, uploads, etc. This toolkit is well-known for Archive Team projects. It also powers the ArchiveTeam warrior. %package -n python3-%{pypi_name} Summary: ArchiveTeam seesaw kit %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-tornado >= 4 Requires: python3-tornado < 4.5 Requires: python3-sockjs-tornado Requires: python3-six #Requires: js-jquery %description -n python3-%{pypi_name} An asynchronous toolkit for distributed web processing. Written in Python and named after its behavior, it supports concurrent downloads, uploads, etc. This toolkit is well-known for Archive Team projects. It also powers the ArchiveTeam warrior. %package -n python-%{pypi_name}-doc Summary: Seesaw documentation %description -n python-%{pypi_name}-doc Documentation for python-seesaw, the Archive Team toolkit. %prep %autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Remove bundled python-six. rm seesaw/six.py %build %py2_build %py3_build # generate html docs sphinx-build doc html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %py3_install ln -sf %{_bindir}/run-pipeline3 %{buildroot}/%{_bindir}/run-pipeline%{python3_version} ln -sf %{_bindir}/run-warrior3 %{buildroot}/%{_bindir}/run-warrior%{python3_version} %py2_install ln -sf %{_bindir}/run-pipeline2 %{buildroot}/%{_bindir}/run-pipeline%{python2_version} ln -sf %{_bindir}/run-warrior2 %{buildroot}/%{_bindir}/run-warrior%{python2_version} # Remove bundled jquery, replace with link to system copy. # Don't do this at the moment, because upstream uses jquery 1.7.x and Fedora packages 2.x #rm %{buildroot}%{python2_sitelib}/%{pypi_name}/public/jquery-1.7.2.min.js #ln -s %{_datadir}/javascript/jquery/latest/jquery.min.js %{buildroot}%{python2_sitelib}/%{pypi_name}/public/jquery-1.7.2.min.js #rm %{buildroot}%{python3_sitelib}/%{pypi_name}/public/jquery-1.7.2.min.js #ln -s %{_datadir}/javascript/jquery/latest/jquery.min.js %{buildroot}%{python3_sitelib}/%{pypi_name}/public/jquery-1.7.2.min.js #%check # Run both versions of nosetests. # There is an error in test_proc_utf8 that doesn't occur when ran manually over the build directory # (But only occurs inside of the spec file). # So... don't do this for the moment. #nosetests-2.7 -v #nosetests-3.4 -v %files -n python2-%{pypi_name} %doc README.md %license LICENSE.txt %{_bindir}/run-pipeline %{_bindir}/run-pipeline2 %{_bindir}/run-pipeline%{python2_version} %{_bindir}/run-warrior %{_bindir}/run-warrior2 %{_bindir}/run-warrior%{python2_version} %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %doc README.md %license LICENSE.txt %{_bindir}/run-pipeline3 %{_bindir}/run-pipeline%{python3_version} %{_bindir}/run-warrior3 %{_bindir}/run-warrior%{python3_version} %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python-%{pypi_name}-doc %doc html %changelog * Fri Jun 3 2016 Ben Rosser 0.9.2-2 - Unbundled copy of six.py - Fleshed out -doc summary/description a bit - Fixed dependency on python-tornado - Depend explicitly on python2-sockjs-tornado instead of python-sockjs-tornado - Added bundled provides for js-jquery, js-sockjs, reset-css, js-smoothie * Thu Apr 28 2016 Ben Rosser 0.9.2-1 - Initial package.