diff --git a/python-send2trash.spec b/python-send2trash.spec index ea7386d..cda3757 100644 --- a/python-send2trash.spec +++ b/python-send2trash.spec @@ -2,16 +2,23 @@ Name: python-send2trash Version: 1.4.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python library to natively send files to Trash License: BSD URL: https://github.com/hsoft/send2trash -Source0: https://files.pythonhosted.org/packages/source/s/send2trash/%{pypiname}-%{version}.tar.gz + +# PyPI sdist lacks tests +Source0: %url/archive/%{version}/%{pypiname}-%{version}.tar.gz BuildArch: noarch + BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-configparser + BuildRequires: python3-devel +BuildRequires: python3-setuptools %description Send2Trash is a small package that sends files to the Trash (or Recycle Bin) @@ -24,9 +31,10 @@ from freedesktop.org. %package -n python2-send2trash Summary: Python library to natively send files to Trash +Provides: python2-%{pypiname} == %{version}-%{release} %{?python_provide:%python_provide python2-%{pypiname}} -%{?python_provide:%python_provide python2-%send2trash} +%{?python_provide:%python_provide python2-send2trash} %description -n python2-send2trash Send2Trash is a small package that sends files to the Trash (or Recycle Bin) @@ -39,6 +47,7 @@ from freedesktop.org. %package -n python3-send2trash Summary: Python library to natively send files to Trash +Provides: python3-%{pypiname} == %{version}-%{release} %{?python_provide:%python_provide python3-%{pypiname}} %{?python_provide:%python_provide python3-send2trash} @@ -52,7 +61,7 @@ Otherwise, it will fallback to its own implementation of the trash specification from freedesktop.org. %prep -%setup -q -n %{pypiname}-%{version} +%setup -q -n send2trash-%{version} %build %py2_build @@ -62,18 +71,29 @@ from freedesktop.org. %py2_install %py3_install +%check +%{__python2} setup.py test +%{__python3} setup.py test %files -n python2-send2trash +%license LICENSE %doc README.rst CHANGES.rst -%{python2_sitelib}/send2trash* -%{python2_sitelib}/%{pypiname}* +%{python2_sitelib}/send2trash/ +%{python2_sitelib}/%{pypiname}-%{version}-py?.?.egg-info %files -n python3-send2trash +%license LICENSE %doc README.rst CHANGES.rst -%{python3_sitelib}/send2trash* -%{python3_sitelib}/%{pypiname}* +%{python3_sitelib}/send2trash/ +%{python3_sitelib}/%{pypiname}-%{version}-py?.?.egg-info %changelog +* Tue Jan 09 2018 Miro HronĨok - 1.4.2-3 +- Run tests, use GH tarball +- Be more explicit in %%files +- Add plain pythonX-%%{pypiname} provides +- Correct a typo in Python 2 python_provide + * Sat Jan 06 2018 williamjmorenor@gmail.com - 1.4.2-2 - Initial import of BZ#1529027 diff --git a/sources b/sources index df890b6..c37e901 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Send2Trash-1.4.2.tar.gz) = 6f9eb835a3a55b892dd14a07a685b8f13f3fea482e2b61f66b92652eeb1e7adcbcf0873d087419f15acbb5fbc1d7cc275b0f2872146b21c7f23064df58418aae +SHA512 (Send2Trash-1.4.2.tar.gz) = fcafac8917e2d9f7ba5553ef7b22628dbc08f74f67cc732ee104fd60e91bd03f19d8c7734b82c1bd164232b74974da95f451d188e2e557e1b87ffd11e02e2a91