# No tests in the package at all %bcond_with tests %global pypi_name Sumatra %global _description %{expand: Tool for managing & tracking projects on numerical simulation & analysis } Name: python-sumatra Version: 0.7.4 Release: 1%{?dist} Summary: Tool for managing and tracking projects # based on numerical simulation and/or analysis, # with the aim of supporting reproducible research License: BSD URL: https://pypi.org/project/%{pypi_name} Source0: %pypi_source # Not included in pypi tar Source1: https://raw.githubusercontent.com/open-research/sumatra/master/LICENSE BuildArch: noarch %{?python_enable_dependency_generator} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel # Not mentioned in setup.py Requires: %{py3_dist gitpython} Requires: %{py3_dist mercurial} Requires: %{py3_dist hgapi} Requires: %{py3_dist django} Requires: %{py3_dist parameters} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info cp %{SOURCE1} . -v # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %build %py3_build %install %py3_install %check %if %{with tests} %{__python3} setup.py test %endif %files -n python3-%{pypi_name} %license LICENSE %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/%{pypi_name} %{_bindir}/smt %{_bindir}/smt-complete.sh %{_bindir}/smtweb %changelog * Sun Mar 1 2020 NITISH SHARMA 0.7.4 - Initial build