%bcond_without tests %global debug_package %{nil} %global pypi_name snakemake %global _description %{expand: The Snakemake workflow management system is a tool to create reproducible and scalable data analyses. Workflows are described via a human readable, Python based language. They can be seamlessly scaled to server, cluster, grid and cloud environments, without the need to modify the workflow definition. Finally, Snakemake workflows can entail a description of required software, which will be automatically deployed to any execution environment.} Name: %{pypi_name} Version: 6.4.1 Release: 1%{?dist} Summary: Workflow management system to create reproducible and scalable data analyses License: MIT URL: https://snakemake.readthedocs.io/en/stable/index.html Source0: https://github.com/%{pypi_name}/%{pypi_name}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: make Requires: %{py3_dist smart_open} %if %{with tests} BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-cov} BuildRequires: %{py3_dist requests-mock} BuildRequires: %{py3_dist filelock} BuildRequires: %{py3_dist datrie} BuildRequires: %{py3_dist ratelimiter} BuildRequires: %{py3_dist pyyaml} BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist pandas} BuildRequires: %{py3_dist jsonschema} BuildRequires: %{py3_dist networkx} BuildRequires: %{py3_dist graphviz} BuildRequires: %{py3_dist GitPython} BuildRequires: %{py3_dist configargparse} BuildRequires: %{py3_dist appdirs} BuildRequires: %{py3_dist docutils} BuildRequires: %{py3_dist boto3} BuildRequires: %{py3_dist smart_open} %endif %py_provides %{pypi_name} %description %_description %package -n snakemake-doc Summary: %{summary} BuildArch: noarch BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx-argparse} BuildRequires: %{py3_dist sphinx_rtd_theme} BuildRequires: %{py3_dist recommonmark} BuildRequires: %{py3_dist docutils} BuildRequires: %{py3_dist configargparse} BuildRequires: %{py3_dist appdirs} %description -n snakemake-doc %_description %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info find %{pypi_name}/ -name "*.cpp" -print -delete find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # Remove shebang from non-executable script sed -i '1d' snakemake/executors/jobscript.sh # Rename subprocess call 'python' to 'python3' sed -i 's/python/python3/g' tests/test_linting.py # Remove napoleon template as it is not used. sed -i '39d' docs/conf.py cat docs/conf.py %build %py3_build pushd docs/ mkdir -p _build/doctrees mkdir -p _build/html make %{?_smp_mflags} html popd %install %py3_install %check %if %{with tests} export PYTHONPATH=%{buildroot}%{python3_sitelib} # tests/test_tibanna needs a network connection, therefore disabled. # tests/test_google_lifesciences.py requires the Google Cloud library for python # tests/test_tes.py requires py-tes. Currently not packaged for Fedora pytest-%{python3_version}\ --ignore tests/test_google_lifesciences.py\ --deselect tests/test_tibanna.py\ --deselect tests/test_tes.py %endif %files %doc README.md %license LICENSE.md %{_bindir}/%{pypi_name} %{_bindir}/%{pypi_name}-bash-completion %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ %files -n snakemake-doc %license LICENSE.md %doc docs/_build/html docs/_build/doctrees %changelog * Thu Jun 17 2021 Aniket Pradhan - 6.4.1-1 - Initial build