d184bc1
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
Sergio Pascual 63796f0
%global with_python3 1
Sergio Pascual 63796f0
%else
Sergio Pascual 63796f0
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
Sergio Pascual 63796f0
%endif
Sergio Pascual 63796f0
Sergio Pascual 166905e
%global srcname d2to1
Sergio Pascual 63796f0
Sergio Pascual 166905e
Name: python-%{srcname}
Sergio Pascual 166905e
Version: 0.2.12
cadefcf
Release: 8.post1%{?dist}
Sergio Pascual 63796f0
Summary: Allows using distutils2-like setup.cfg files with setup.py
Sergio Pascual 63796f0
License: BSD
Sergio Pascual 63796f0
Sergio Pascual 63796f0
Group: Development/Languages
Sergio Pascual 63796f0
URL: http://pypi.python.org/pypi/d2to1
Sergio Pascual 166905e
#Source0: http://pypi.python.org/packages/source/d/d2to1/%{srcname}-%{version}.tar.gz
Sergio Pascual 166905e
Source0: https://pypi.python.org/packages/source/d/d2to1/d2to1-0.2.12.post1.tar.gz
cadefcf
BuildRequires: python2-devel python2-setuptools
Sergio Pascual 166905e
Sergio Pascual 63796f0
BuildArch: noarch
Sergio Pascual 63796f0
e1afa25
%global _description\
e1afa25
d2to1 allows using distutils2-like setup.cfg files for a package's metadata\
e1afa25
with a distribute/setuptools setup.py script. It works by providing a\
e1afa25
distutils2-formatted setup.cfg file containing all of a package's metadata,\
Sergio Pascual 63796f0
and a very minimal setup.py which will slurp its arguments from the setup.cfg.
Sergio Pascual 63796f0
e1afa25
%description %_description
e1afa25
e1afa25
%package -n python2-d2to1
e1afa25
Summary: %summary
cadefcf
Requires: python2-setuptools
e1afa25
Provides: python2-d2to1
e1afa25
%{?python_provide:%python_provide python2-d2to1}
e1afa25
e1afa25
%description -n python2-d2to1 %_description
e1afa25
Sergio Pascual 63796f0
%if 0%{?with_python3}
Sergio Pascual 63796f0
%package -n python3-d2to1
Sergio Pascual 63796f0
Summary: Allows using distutils2-like setup.cfg files with setup.py
Pasrario b4da480
BuildRequires:  python3-devel python3-setuptools
Pasrario b4da480
Requires:  python3-setuptools
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%description -n python3-d2to1
Sergio Pascual 63796f0
d2to1 allows using distutils2-like setup.cfg files for a package's metadata 
Sergio Pascual 63796f0
with a distribute/setuptools setup.py script. It works by providing a 
Sergio Pascual 63796f0
distutils2-formatted setup.cfg file containing all of a package's metadata, 
Sergio Pascual 63796f0
and a very minimal setup.py which will slurp its arguments from the setup.cfg.
Sergio Pascual 63796f0
%endif # with_python3
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%prep
Sergio Pascual 166905e
#%setup -q -n %{srcname}-%{version}
Sergio Pascual 166905e
%setup -q -n %{srcname}-%{version}.post1
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%if 0%{?with_python3}
Sergio Pascual 63796f0
rm -rf %{py3dir}
Sergio Pascual 63796f0
cp -a . %{py3dir}
Sergio Pascual 63796f0
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
Sergio Pascual 63796f0
%endif # with_python3
Sergio Pascual 63796f0
Sergio Pascual 63796f0
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%build
Sergio Pascual a45a78b
%{__python2} setup.py build
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%if 0%{?with_python3}
Sergio Pascual 63796f0
pushd %{py3dir}
Sergio Pascual 63796f0
%{__python3} setup.py build
Sergio Pascual 63796f0
popd
Sergio Pascual 63796f0
%endif # with_python3
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%install
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%if 0%{?with_python3}
Sergio Pascual 63796f0
pushd %{py3dir}
Sergio Pascual a45a78b
%{__python3} setup.py install --skip-build --root %{buildroot}
Sergio Pascual 63796f0
popd
Sergio Pascual 63796f0
%endif # with_python3
Sergio Pascual 63796f0
Sergio Pascual a45a78b
%{__python2} setup.py install --skip-build --root %{buildroot}
Sergio Pascual 63796f0
e1afa25
%files -n python2-d2to1
Sergio Pascual 166905e
%doc CHANGES.rst README.rst
Sergio Pascual 166905e
%license LICENSE
Sergio Pascual a45a78b
%{python2_sitelib}/*
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%if 0%{?with_python3}
Sergio Pascual 63796f0
%files -n python3-d2to1
Sergio Pascual 166905e
%doc CHANGES.rst README.rst
Sergio Pascual 166905e
%license LICENSE
Sergio Pascual 63796f0
%{python3_sitelib}/*
Sergio Pascual 63796f0
%endif # with_python3
Sergio Pascual 63796f0
Sergio Pascual 63796f0
Sergio Pascual 63796f0
%changelog
cadefcf
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.2.12-8.post1
cadefcf
- Update Python 2 dependency declarations to new packaging standards
cadefcf
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cadefcf
3bf3065
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.12-7.post1
3bf3065
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3bf3065
e1afa25
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.12-6.post1
e1afa25
- Python 2 binary package renamed to python2-d2to1
e1afa25
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
e1afa25
55802cc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.12-5.post1
55802cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
55802cc
0370fc7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.12-4.post1
0370fc7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0370fc7
e772640
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.2.12-3.post1
e772640
- Rebuild for Python 3.6
e772640
5131f40
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.12-2.post1
5131f40
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5131f40
Sergio Pascual 166905e
* Tue Mar 29 2016 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.12-1.post1
Sergio Pascual 166905e
- New upstream source (0.2.12)
Sergio Pascual 166905e
dfe02ed
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.11-6
dfe02ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
dfe02ed
4d18a12
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.11-5
4d18a12
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
4d18a12
307b571
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.11-4
307b571
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
307b571
776df76
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.11-3
776df76
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
776df76
18ace47
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.2.11-2
18ace47
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
18ace47
Sergio Pascual a45a78b
* Mon Feb 24 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.11-1
Sergio Pascual a45a78b
- New upstream source (0.2.11)
Sergio Pascual a45a78b
- Use python2 macro
Sergio Pascual a45a78b
dcd8af3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-2
dcd8af3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
dcd8af3
Sergio Pascual 5cd1fc0
* Thu Apr 25 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.10-1
Sergio Pascual 5cd1fc0
- New upstream source
Sergio Pascual 5cd1fc0
5512cc0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-3
5512cc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5512cc0
Pasrario b4da480
* Fri Jan 04 2013 Sergio Pascual <sergiopr at fedoraproject.org> - 0.2.7-2
Pasrario b4da480
- Requires for python3 inside python3 package (bz #891381)
Pasrario b4da480
Sergio Pascual 63796f0
* Wed Sep 26 2012 Sergio Pascual <sergiopr at fedoraproject.org> - 0.2.7-1
Sergio Pascual 63796f0
- New upstream source
Sergio Pascual 63796f0
- Removing upstream egg-info and defattr
Sergio Pascual 63796f0
Sergio Pascual 63796f0
* Thu Sep 22 2011 Sergio Pascual <sergiopr at fedoraproject.org> - 0.2.5-1
Sergio Pascual 63796f0
- Initial spec file
Sergio Pascual 63796f0