Use setuptools instead of distribute (which is part of devel)

By building the package with setuptools, we ensure it is compatible
with pip 10 and above which require file manifests to be packaged.

Change-Id: I6da38bad79128a66ef2f4e4929529769cc36f916
This commit is contained in:
Dirk Mueller 2019-03-06 22:56:31 +01:00 committed by Javier Pena
parent 9dc46b2a88
commit 3f6d3a34c4
11 changed files with 12 additions and 18 deletions

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-angular-bootstrap/ URL: https://git.openstack.org/cgit/openstack/xstatic-angular-bootstrap/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-angular-fileupload/ URL: https://git.openstack.org/cgit/openstack/xstatic-angular-fileupload/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-angular-gettext/ URL: https://git.openstack.org/cgit/openstack/xstatic-angular-gettext/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -1,14 +1,18 @@
{% set pypi_name = 'XStatic-Bootstrap-Datepicker' %}
{% set upstream_version = upstream_version('1.3.1.0') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%global sname XStatic-Bootstrap-Datepicker %global sname XStatic-Bootstrap-Datepicker
Name: {{ py2name('XStatic-Bootstrap-Datepicker') }} Name: {{ py2name() }}
Version: 1.3.1.0 Version: {{ py2rpmversion() }}
Release: 0 Release: {{ py2rpmrelease() }}
Summary: Bootstrap-Datepicker %{version} (XStatic packaging standard) Summary: Bootstrap-Datepicker %{version} (XStatic packaging standard)
License: {{ license('Apache-2.0') }} License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: {{ source }}
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch
@ -17,7 +21,7 @@ BuildArch: noarch
Bootstrap-Datepicker javascript library packaged for setuptools (easy_install) / pip. Bootstrap-Datepicker javascript library packaged for setuptools (easy_install) / pip.
%prep %prep
%autosetup -n %{sname}-%{version} %autosetup -n %{sname}-{{ upstream_version }}
%py_req_cleanup %py_req_cleanup
%build %build
@ -29,7 +33,7 @@ Bootstrap-Datepicker javascript library packaged for setuptools (easy_install) /
%files %files
%doc README.txt %doc README.txt
%{python2_sitelib}/xstatic %{python2_sitelib}/xstatic
%{python2_sitelib}/XStatic_Bootstrap_Datepicker-%{version}-py?.?.egg-info %{python2_sitelib}/XStatic_Bootstrap_Datepicker-*-py?.?.egg-info
%{python2_sitelib}/XStatic_Bootstrap_Datepicker-%{version}-py?.?-nspkg.pth %{python2_sitelib}/XStatic_Bootstrap_Datepicker-*-py?.?-nspkg.pth
%changelog %changelog

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/{sname}/ URL: https://git.openstack.org/cgit/openstack/{sname}/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch

View File

@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-jquery-migrate URL: https://git.openstack.org/cgit/openstack/xstatic-jquery-migrate
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }} BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }} Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch BuildArch: noarch