diff --git a/.gitignore b/.gitignore index e69de29..f4d3d69 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/colcon-cd-0.1.1.tar.gz diff --git a/python-colcon-cd-0.1.1-install-data-files-manually.patch b/python-colcon-cd-0.1.1-install-data-files-manually.patch new file mode 100644 index 0000000..b1fc56b --- /dev/null +++ b/python-colcon-cd-0.1.1-install-data-files-manually.patch @@ -0,0 +1,18 @@ +diff -uNr a/setup.cfg b/setup.cfg +--- a/setup.cfg 2019-10-21 16:41:18.000000000 -0700 ++++ b/setup.cfg 2019-11-01 10:06:30.405041428 -0700 +@@ -45,10 +45,10 @@ + scspell3k>=2.2 + zip_safe = true + +-[options.data_files] +-# distutils replaces dashes in keys with underscores +-share/colcon_cd/function = +- function/colcon_cd.sh ++# [options.data_files] ++# # distutils replaces dashes in keys with underscores ++# share/colcon_cd/function = ++# function/colcon_cd.sh + + [tool:pytest] + filterwarnings = diff --git a/python-colcon-cd.spec b/python-colcon-cd.spec new file mode 100644 index 0000000..64978d3 --- /dev/null +++ b/python-colcon-cd.spec @@ -0,0 +1,74 @@ +%global srcname colcon-cd + +Name: python-%{srcname} +Version: 0.1.1 +Release: 3%{?dist} +Summary: Extension for colcon to change the current working directory + +License: ASL 2.0 +URL: https://colcon.readthedocs.io +Source0: https://github.com/colcon/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +# Not submitted upstream +Patch0: %{name}-0.1.1-install-data-files-manually.patch + +%description +A shell function for colcon-core to change the current working directory. + + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-setuptools >= 30.3.0 +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%if %{undefined __pythondist_requires} +Requires: python%{python3_pkgversion}-colcon-core >= 0.4.1 +Requires: python%{python3_pkgversion}-colcon-package-information +%endif # __pythondist_requires + +%description -n python%{python3_pkgversion}-%{srcname} +A shell function for colcon-core to change the current working directory. + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + + +%build +%py3_build + + +%install +%py3_install + +install -p -D function/colcon_cd.sh %{buildroot}%{_datadir}/colcon_cd/function/colcon_cd.sh + + +%check +%{__python3} -m pytest \ + --ignore=test/test_spell_check.py \ + --ignore=test/test_flake8.py \ + test + + +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/colcon_cd/ +%{python3_sitelib}/colcon_cd-%{version}-py%{python3_version}.egg-info/ +%{_datadir}/colcon_cd/ + + +%changelog +* Fri Nov 01 2019 Scott K Logan - 0.1.1-3 +- Install files to %%{_datadir} manually for older setuptools compat + +* Wed Oct 30 2019 Scott K Logan - 0.1.1-2 +- Fix ownership of %%{_datadir}/colcon_cd + +* Wed Oct 30 2019 Scott K Logan - 0.1.1-1 +- Initial package diff --git a/sources b/sources index e69de29..adc1764 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (colcon-cd-0.1.1.tar.gz) = 7ca343734b5d287a506f5ac78d1c28098ab473f351623114cc3587bbfff18e670aadc46e85db8bd40f31184a4c06062a9f1b4a77200169511e1b7c2b426edc5b