%global pypi_name nudatus Name: python-%{pypi_name} Version: 0.0.2 Release: 1%{?dist} Summary: Strip comments from Python scripts License: MIT URL: https://github.com/zanderbrown/nudatus Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(pytest) %description Nudatus is a tool to remove comments from python scripts. It's created for use in uflash to help squeeze longer programs onto the micro:bit but it should be suitable for various environments with restricted storage. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(setuptools) Provides: %{pypi_name} == %{version}-%{release} %description -n python3-%{pypi_name} Nudatus is a tool to remove comments from python scripts. It's created for use in uflash to help squeeze longer programs onto the micro:bit but it should be suitable for various environments with restricted storage. %prep %autosetup -n %{pypi_name}-%{version} %build %py3_build %install %py3_install %check # https://github.com/ZanderBrown/nudatus/pull/1 sed -i "s/f.read().encode('utf-8')/f.read()/" tests/test_nudatus.py %{__python3} -m pytest -vvv tests %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{_bindir}/nudatus %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Tue Apr 10 2018 Miro HronĨok - 0.0.2-1 - Initial package.