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: I947144a2ab961cadd3c2300c1f9c2ed38398e272
This commit is contained in:
Dirk Mueller
2019-03-10 18:58:43 +01:00
committed by Javier Peña
parent 71dff4c363
commit 23107aa713
10 changed files with 34 additions and 29 deletions

View File

@@ -1,14 +1,18 @@
{% set pypi_name = 'XStatic-JQuery.Bootstrap.Wizard' %}
{% set upstream_version = upstream_version('1.0.0.1') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%global sname XStatic-JQuery.Bootstrap.Wizard
Name: {{ py2name('XStatic-JQuery.Bootstrap.Wizard') }}
Version: 1.0.0.1
Release: 0
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: JQuery.Bootstrap.Wizard %{version} (XStatic packaging standard)
License: {{ license('MIT') }}
Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-jquery.bootstrap.wizard
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
JQuery.Bootstrap.Wizard 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 @@ JQuery.Bootstrap.Wizard JavaScript library packaged for setuptools (easy_install
%files
%doc README.txt
%{python2_sitelib}/xstatic
%{python2_sitelib}/XStatic_JQuery.Bootstrap.Wizard-%{version}-py?.?.egg-info
%{python2_sitelib}/XStatic_JQuery.Bootstrap.Wizard-%{version}-py?.?-nspkg.pth
%{python2_sitelib}/XStatic_JQuery.Bootstrap.Wizard-*-py?.?.egg-info
%{python2_sitelib}/XStatic_JQuery.Bootstrap.Wizard-*-py?.?-nspkg.pth
%changelog

View File

@@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-jquery.tablesorter/
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.quicksearch/
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-jsencrypt/
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-jasmine/
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-magic-search/
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-qunit/
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-Rickshaw' %}
{% set upstream_version = upstream_version('1.5.0.0') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%global sname XStatic-Rickshaw
Name: {{ py2name('XStatic-Rickshaw') }}
Version: 1.5.0.0
Release: 0
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: Rickshaw %{version} (XStatic packaging standard)
License: {{ license('MIT') }}
Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-rickshaw/
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
Rickshaw 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 @@ Rickshaw JavaScript library packaged for setuptools (easy_install) / pip.
%files
%doc README.txt
%{python2_sitelib}/xstatic
%{python2_sitelib}/XStatic_Rickshaw-%{version}-py?.?.egg-info
%{python2_sitelib}/XStatic_Rickshaw-%{version}-py?.?-nspkg.pth
%{python2_sitelib}/XStatic_Rickshaw-*-py?.?.egg-info
%{python2_sitelib}/XStatic_Rickshaw-*-py?.?-nspkg.pth
%changelog

View File

@@ -8,7 +8,6 @@ Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/xstatic-spin/
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-angular-ui-router' %}
{% set upstream_version = upstream_version('0.3.1.2') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%global sname XStatic-angular-ui-router
Name: {{ py2name('XStatic-angular-ui-router') }}
Version: 0.3.1.2
Release: 0
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: angular-ui-router %{version} (XStatic packaging standard)
License: {{ license('MIT') }}
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
angular-ui-router javascript library packaged for setuptools (easy_install) / pip.
%prep
%autosetup -n %{sname}-%{version}
%autosetup -n %{sname}-{{ upstream_version }}
sed -i 's/ setup_requires/# setup_requires/' setup.py
sed -i 's/ version=.*/ version="0.3.1.2",/' setup.py
%py_req_cleanup