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/
Source0: https://files.pythonhosted.org/packages/source/X/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('XStatic') }}
BuildArch: noarch

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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