From e1e137a6e63b51b90a84703af2e46d087a976af8bd02922412f8a44b7ce00239 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 13 Nov 2017 18:48:49 +0000 Subject: [PATCH] Accepting request 541582 from home:TheBlackCat:branches:devel:languages:python - Properly handle namespace package structure. This guarantees the module is importable. OBS-URL: https://build.opensuse.org/request/show/541582 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jaraco.itertools?expand=0&rev=3 --- python-jaraco.itertools.changes | 6 ++++++ python-jaraco.itertools.spec | 28 ++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/python-jaraco.itertools.changes b/python-jaraco.itertools.changes index ce5ea04..3646227 100644 --- a/python-jaraco.itertools.changes +++ b/python-jaraco.itertools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 13 18:26:17 UTC 2017 - toddrme2178@gmail.com + +- Properly handle namespace package structure. + This guarantees the module is importable. + ------------------------------------------------------------------- Tue Jul 4 18:21:32 UTC 2017 - aloisio@gmx.com diff --git a/python-jaraco.itertools.spec b/python-jaraco.itertools.spec index 2d7751f..2f849fd 100644 --- a/python-jaraco.itertools.spec +++ b/python-jaraco.itertools.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_with test Name: python-jaraco.itertools Version: 2.0.1 Release: 0 @@ -26,20 +27,24 @@ Group: Development/Languages/Python Url: https://github.com/jaraco/jaraco.itertools Source0: https://files.pythonhosted.org/packages/source/j/jaraco.itertools/jaraco.itertools-%{version}.tar.gz BuildRequires: %{python_module base} +BuildRequires: %{python_module jaraco.base} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{with test} BuildRequires: %{python_module inflect} BuildRequires: %{python_module more-itertools} BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools_scm} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} -BuildRequires: fdupes -BuildRequires: python-rpm-macros +%endif +Requires: python-jaraco.base Requires: python-inflect Requires: python-more-itertools Requires: python-six -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch + %python_subpackages %description @@ -56,14 +61,21 @@ rm -rf jaraco.itertools.egg-info %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +# We aren't using the nspkg approach anymore +%{python_expand rm -r %{buildroot}%{$python_sitelib}/jaraco.itertools-%{version}-py*-nspkg.pth +%fdupes %{buildroot}%{$python_sitelib} +} +%if %{with test} %check -%python_exec setup.py test +%python_expand py.test-%{$python_bin_suffix} +%endif %files %{python_files} %defattr(-,root,root) %doc docs/*.rst README.rst CHANGES.rst -%{python_sitelib}/* +%{python_sitelib}/jaraco.itertools-%{version}-py*.egg-info +%{python_sitelib}/jaraco/itertools.py* +%pycache_only %{python_sitelib}/jaraco/__pycache__/itertools*.py* %changelog