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