%global mod_name userpath %global pypi_name adduserpath Name: python-%{pypi_name} Version: 0.4.0 Release: 1%{?dist} Summary: Cross-platform tool for adding locations to the user PATH License: MIT or ASL 2.0 URL: https://github.com/ofek/%{mod_name} Source0: https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-click BuildRequires: python2-pytest BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-click BuildRequires: python3-pytest BuildRequires: python3-setuptools %description Ever wanted to release a cool new app but found it difficult to add its location to PATH for users? Me too! This tool does that for you on all major operating systems and does not require elevated privileges! Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at! %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2-click Requires: python2-setuptools %description -n python2-%{pypi_name} Ever wanted to release a cool new app but found it difficult to add its location to PATH for users? Me too! This tool does that for you on all major operating systems and does not require elevated privileges! Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at! Package contains Python 2 module. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-click Requires: python3-setuptools %description -n python3-%{pypi_name} Ever wanted to release a cool new app but found it difficult to add its location to PATH for users? Me too! This tool does that for you on all major operating systems and does not require elevated privileges! Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at! Package contains Python 3 module and executable. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} -m pytest %{__python3} -m pytest # Remove tests from sitelibs rm -r %{buildroot}%{python2_sitelib}/tests rm -r %{buildroot}%{python3_sitelib}/tests %files -n python2-%{pypi_name} %license LICENSE-APACHE LICENSE-MIT %doc README.rst %{python2_sitelib}/%{mod_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %license LICENSE-APACHE LICENSE-MIT %doc README.rst %{_bindir}/%{mod_name} %{python3_sitelib}/%{mod_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Mon Oct 02 2017 Lumir Balhar - 0.4.0-1 - Initial package.