Accepting request 540599 from home:TheBlackCat:branches:devel:languages:python

- Use proper install so .egg-info is available.
  This makes sure other packages can properly detect it.

OBS-URL: https://build.opensuse.org/request/show/540599
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-entrypoints?expand=0&rev=5
This commit is contained in:
Todd R 2017-11-10 16:23:25 +00:00 committed by Git OBS Bridge
parent adfcd7c2c2
commit ac25d8a4e9
2 changed files with 21 additions and 17 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 9 18:47:32 UTC 2017 - toddrme2178@gmail.com
- Use proper install so .egg-info is available.
This makes sure other packages can properly detect it.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 3 05:15:52 UTC 2017 - arun@gmx.de Fri Nov 3 05:15:52 UTC 2017 - arun@gmx.de

View File

@ -17,6 +17,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-entrypoints Name: python-entrypoints
Version: 0.2.3 Version: 0.2.3
Release: 0 Release: 0
@ -26,13 +27,15 @@ Group: Development/Languages/Python
Url: https://github.com/takluyver/entrypoints Url: https://github.com/takluyver/entrypoints
Source: https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-%{version}.tar.gz
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest} BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%ifpython2 %if %{with test}
BuildRequires: %{python_module pytest}
BuildRequires: python-configparser BuildRequires: python-configparser
Requires: python-configparser
%endif %endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build %ifpython2
Requires: python-configparser >= 3.5
%endif
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@ -51,31 +54,26 @@ plugins, or multiple groups if it has different kinds of plugins.
%setup -q -n entrypoints-%{version} %setup -q -n entrypoints-%{version}
%build %build
# We don't do anything here %python_build
%install %install
%{python_expand mkdir -p %{buildroot}%{$python_sitelib} %python_install
cp -r entrypoints.py %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
}
%if %have_python2
%py_compile %{buildroot}%{python2_sitelib}
%endif
%if %have_python3
%py3_compile %{buildroot}%{python3_sitelib}
%endif
%if %{with test}
%check %check
pushd tests pushd tests
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python test_entrypoints.py $python test_entrypoints.py
} }
popd popd
%endif
%files %{python_files} %files %{python_files}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{python_sitelib}/* %{python_sitelib}/entrypoints.py*
%pycache_only %{python_sitelib}/__pycache__/entrypoints*.py*
%{python_sitelib}/entrypoints-%{version}-py*.egg-info
%changelog %changelog