diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd3057c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/adduserpath-0.4.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 1c47025..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-adduserpath - -Cross-platform tool for adding locations to the user PATH \ No newline at end of file diff --git a/python-adduserpath.spec b/python-adduserpath.spec new file mode 100644 index 0000000..6d3f34e --- /dev/null +++ b/python-adduserpath.spec @@ -0,0 +1,97 @@ +%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: dos2unix + +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 +# Convert EOL encoding to Unix one +# https://github.com/ofek/userpath/issues/2 +dos2unix -v README.rst + +%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. diff --git a/sources b/sources new file mode 100644 index 0000000..9cf85ee --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (adduserpath-0.4.0.tar.gz) = f0b2534ac99029419b180e12f823e149fd81f32adc3ac3a1802bffbd5717f64d5b96ffc0ac9ef80a421e266d9321d4530099fd35bdd6cbd214826da52161c677