1- %if 0%{?rhel } && 0%{?rhel } <= 7
2- %bcond_with python3
3- %else
4- %bcond_without python3
5- %endif
6-
71%global modname product_listings_manager
82
93Name: product-listings-manager
@@ -16,7 +10,6 @@ URL: https://github.com/release-engineering/product-listings-manager
1610Source0: %{name }-%{version }.tar.gz
1711BuildArch: noarch
1812
19- %if %{with python3 }
2013BuildRequires: python3-devel
2114BuildRequires: python3-flask
2215BuildRequires: python3-flask-sqlalchemy
@@ -25,28 +18,13 @@ BuildRequires: python3-koji
2518BuildRequires: python3-psycopg2
2619BuildRequires: python3-setuptools
2720BuildRequires: python3-sqlalchemy
21+ Requires: koji
2822Requires: python3-flask
2923Requires: python3-flask-sqlalchemy
3024Requires: python3-flask-restful
3125Requires: python3-koji
3226Requires: python3-psycopg2
3327Requires: python3-sqlalchemy
34- %else
35- BuildRequires: python2-devel
36- BuildRequires: python-flask
37- BuildRequires: python-flask-sqlalchemy
38- BuildRequires: python-psycopg2
39- BuildRequires: python-sqlalchemy
40- BuildRequires: python2-flask-restful
41- BuildRequires: python2-koji
42- BuildRequires: python2-setuptools
43- Requires: python-flask
44- Requires: python-flask-sqlalchemy
45- Requires: python-sqlalchemy
46- Requires: python2-flask-restful
47- Requires: python2-koji
48- Requires: python-psycopg2
49- %endif
5028
5129%description
5230HTTP interface for finding product listings and interacting with data in
@@ -55,21 +33,11 @@ composedb.
5533%prep
5634%autosetup
5735
58-
5936%build
60- %if %{with python3 }
6137%py3_build
62- %else
63- %py2_build
64- %endif
65-
6638
6739%install
68- %if %{with python3 }
6940%py3_install
70- %else
71- %py2_install
72- %endif
7341mkdir -p %{buildroot }%{_sysconfdir }/%{name }
7442cp -p %{modname }/config.py %{buildroot }%{_sysconfdir }/%{name }
7543
@@ -79,13 +47,8 @@ cp -p %{modname}/config.py %{buildroot}%{_sysconfdir}/%{name}
7947%config(noreplace) %{_sysconfdir }/%{name }/config.py
8048%exclude %{_sysconfdir }/%{name }/config.pyc
8149%exclude %{_sysconfdir }/%{name }/config.pyo
82- %if %{with python3 }
8350%{python3_sitelib }/%{modname }/
8451%{python3_sitelib }/%{modname }-* .egg-info/
85- %else
86- %{python2_sitelib }/%{modname }/
87- %{python2_sitelib }/%{modname }-* .egg-info/
88- %endif
8952
9053%changelog
9154* Mon Jul 01 2019 Haibo Lin <hlin@redhat.com> 1.1.0-1
0 commit comments