Notification time stamped 2021-07-01 00:47:56 UTC
From b80f25bfa4a2f294d6e15eb5c38384916a8ad8a0 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Jul 01 2021 00:17:25 +0000
Subject: Initial import
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9027291
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/howdoi-2.0.16.tar.gz
diff --git a/python-howdoi.spec b/python-howdoi.spec
new file mode 100644
index 0000000..5424b86
--- /dev/null
+++ b/python-howdoi.spec
@@ -0,0 +1,87 @@
+%global srcname howdoi
+
+Name: python-%{srcname}
+Version: 2.0.16
+Release: 2%{?dist}
+Summary: Instant coding answers via the command line
+
+License: MIT
+URL:
https://github.com/gleitz/howdoi
+# pypi archive does not contain test data
+# Source0: {pypi_source}
+Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
+
+BuildArch: noarch
+
+%global _description %{expand:
+Sherlock, your neighborhood command-line sloth sleuth.
+
+Are you a hack programmer? Do you find yourself constantly Googling for how to
+do basic programming tasks?
+
+Suppose you want to know how to format a date in bash. Why open your browser and
+read through blogs (risking major distraction) when you can simply stay in the
+console and ask howdoi:
+
+ $ howdoi format date bash
+ > DATE=`date +%%Y-%%m-%%d`}
+
+%description %_description
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+BuildRequires: python3-devel
+BuildRequires: python3-pytest
+BuildRequires: python3-setuptools
+BuildRequires: python3dist(appdirs)
+BuildRequires: python3dist(cachelib)
+BuildRequires: python3dist(keep)
+BuildRequires: python3dist(pygments)
+BuildRequires: python3dist(pyquery)
+
+%description -n python3-%{srcname} %_description
+
+%prep
+%autosetup -n %{srcname}-%{version} -p1
+# remove shebang
+sed -i.shebang '1d' howdoi/howdoi.py
+touch -R howdoi/howdoi.py.shebang howdoi/howdoi.py
+
+%build
+%py3_build
+
+%install
+%py3_install
+
+%check
+# some tests fail if run at once with
+# OSError: [Errno 24] Too many open files
+# ``ulimit -n unlimited`` is not an option
+TEST_CLASS=test_howdoi.py::HowdoiTestCase
+skipped_tests=(multiple_answers position unicode_answer)
+DESELECT=
+for testcase in "${skipped_tests[@]}"; do
+ DESELECT+=" --deselect ${TEST_CLASS}::test_${testcase}"
+done
+%pytest -v ${DESELECT}
+for testcase in "${skipped_tests[@]}"; do
+ SELECT+=" ${TEST_CLASS}::test_${testcase}"
+done
+%pytest -v ${SELECT}
+
+%files -n python3-%{srcname}
+%license LICENSE.txt
+%doc CHANGES.txt README.rst
+%{python3_sitelib}/%{srcname}-*.egg-info/
+%{python3_sitelib}/%{srcname}/
+%{_bindir}/%{srcname}
+
+
+%changelog
+* Wed Jun 30 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.0.16-2
+- Escape %%s in description
+- fix shebang in non-executable file
+- Use `--deselect` to temporarily skip expensive tests
+
+* Tue Jun 29 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.0.16-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..2b878ea
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (howdoi-2.0.16.tar.gz) =
5a6ac8b957b61a0dac9d09f76df8be70400d6f823955375ad8c1fd440c6c56505d17d82aee82d96d1d1c811515e49b4d9c2e884306b60b08b668d6c51ff4bfd0
https://src.fedoraproject.org/rpms/python-howdoi/c/b80f25bfa4a2f294d6e15e...