diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..edfada7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/guizero-0.5.3-4b76aa3.tar.gz diff --git a/python-guizero.spec b/python-guizero.spec new file mode 100644 index 0000000..a9249e9 --- /dev/null +++ b/python-guizero.spec @@ -0,0 +1,75 @@ +%global pypi_name guizero + +Name: python-%{pypi_name} +Version: 0.5.3 +Release: 1%{?dist} +Summary: Python module to allow learners to easily create GUIs + +# no license and tests in sdist, no recent tags on github +%global commit 4b76aa32905ec67564b93c652fefb773d881edbf +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +License: BSD +URL: https://github.com/lawsie/guizero +Source0: %{url}/archive/%{commit}/%{pypi_name}-%{version}-%{shortcommit}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-tkinter +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(pytest) +BuildRequires: /usr/bin/xvfb-run +BuildRequires: font(dejavusans) +BuildRequires: font(dejavuserif) + +%description +Guizero is designed to allow new learners to quickly and easily create +GUIs for their programs. + + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(pillow) >= 4.3.0 +Requires: python3-tkinter + +%description -n python3-%{pypi_name} +Guizero is designed to allow new learners to quickly and easily create +GUIs for their programs. + + +%prep +%autosetup -n %{pypi_name}-%{commit} + +# use free fonts in tests +sed -i 's/Times New Roman/DejaVu Serif/g' tests/*.py +sed -i 's/Arial/DejaVu Sans/g' tests/*.py + + +%build +%py3_build + + +%install +%py3_install + + +%check +# if called form builddir, tests open a window when collecting and hang until closed +pushd tests +export PYTHONPATH=%{buildroot}%{python3_sitelib} +xvfb-run %{__python3} -m pytest -v +popd + + +%files -n python3-%{pypi_name} +%doc README.md +%license license.txt +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + + +%changelog +* Tue Aug 14 2018 Miro HronĨok - 0.5.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..fbf0099 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (guizero-0.5.3-4b76aa3.tar.gz) = 5fc9fa9c0237579ab1ef01618e1f800baab1cac3028960492d9109c0e851a575a07dc6dff8da3d421c6554faf7f8b69f2a4fc70ca0d2d57e8d820036b351bddc