%global gitver 2ac12a8 Summary: Python package that helps you create JSON files with Python and JavaScript style inline comments Name: commentjson Version: 0.7.2 Release: %{?gitver:0.1.git%{gitver}}%{!?gitver:1}%{?dist} Source0: commentjson-%{version}%{?gitver:.git%{gitver}}.tar.xz BuildArch: noarch License: MIT Group: Development/Libraries Url: https://github.com/vaidik/commentjson BuildRequires: python2-setuptools BuildRequires: python3-setuptools %description Summary: Python package that helps you create JSON files with Python and JavaScript style inline comments %package -n python2-commentjson Summary: Python2 package that helps you create JSON files with Python and JavaScript style inline comments BuildRequires: python2-devel %description -n python2-commentjson Commentjson for Python2 %package -n python3-commentjson Summary: Python2 package that helps you create JSON files with Python and JavaScript style inline comments BuildRequires: python3-devel %description -n python3-commentjson Commentjson for Python3 %prep %setup -q -D -T -c -n %{name} -a 0 cp -r %{name}-%{version}%{?gitver:.git%{gitver}} python2_build mv %{name}-%{version}%{?gitver:.git%{gitver}} python3_build %build pushd python2_build CFLAGS="%{optflags}" %{__python2} setup.py build popd pushd python3_build CFLAGS="%{optflags}" %{__python3} setup.py build popd %install pushd python2_build %{__python2} setup.py install --skip-build --root %{buildroot} popd pushd python3_build %{__python3} setup.py install --skip-build --root %{buildroot} popd %files -n python2-commentjson %{python2_sitelib}/%{name} %{python2_sitelib}/%{name}-*.egg-info %files -n python3-commentjson %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-*.egg-info %changelog * Wed May 29 2019 Yupeng Chang - 0.7.2.git2ac12a8-1 - Update to latest git * Wed Oct 31 2018 Yupeng Chang - 0.7.git7ef01ea-1 - Update to latest git * Fri Dec 01 2017 Yupeng Chang - 0.6.git7bc8935-1 - Initial build