Blame python-dockerfile-parse.spec

46e834
%if 0%{?rhel} && 0%{?rhel} <= 7
46e834
%bcond_with python3
46e834
%if 0%{?rhel} <= 6
8778f5
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
46e834
%{!?_licensedir:%global license %%doc}
a00bcf
%endif
46e834
%else
46e834
%bcond_without python3
a00bcf
%endif
a00bcf
46e834
%bcond_without tests
8778f5
46e834
%global srcname dockerfile-parse
46e834
%global modname %(n=%{srcname}; echo ${n//-/_})
a00bcf
46e834
Name:           python-%{srcname}
a6718c
Version:        0.0.11
732171
Release:        4%{?dist}
a00bcf
a00bcf
Summary:        Python library for Dockerfile manipulation
a00bcf
License:        BSD
46e834
URL:            https://github.com/DBuildService/dockerfile-parse
46e834
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
a00bcf
a00bcf
BuildArch:      noarch
a00bcf
46e834
%description
46e834
%{summary}.
46e834
46e834
%package -n python2-%{srcname}
46e834
Summary:        %{summary}
46e834
%{?python_provide:%python_provide python2-%{srcname}}
a00bcf
BuildRequires:  python2-devel
46e834
%if 0%{?rhel} && 0%{?rhel} <= 7
a00bcf
BuildRequires:  python-setuptools
8778f5
BuildRequires:  pytest
46e834
%else
46e834
BuildRequires:  python2-setuptools
46e834
BuildRequires:  python2-pytest
f4616f
BuildRequires:  python2-six
46e834
%endif
19ba07
Requires:  python2-six
8778f5
46e834
%description -n python2-%{srcname}
46e834
%{summary}.
a00bcf
46e834
Python 2 version.
46e834
46e834
%if %{with python3}
46e834
%package -n python3-%{srcname}
46e834
Summary:        %{summary}
46e834
%{?python_provide:%python_provide python3-%{srcname}}
a00bcf
BuildRequires:  python3-devel
a00bcf
BuildRequires:  python3-setuptools
46e834
%if %{with tests}
8778f5
BuildRequires:  python3-pytest
f4616f
BuildRequires:  python3-six
46e834
%endif
19ba07
Requires:  python3-six
a00bcf
46e834
%description -n python3-%{srcname}
46e834
%{summary}.
a00bcf
46e834
Python 3 version.
46e834
%endif
a00bcf
a00bcf
%prep
2ed479
%setup -n %{srcname}-%{version}
2ed479
a00bcf
a00bcf
%build
46e834
%py2_build
46e834
%if %{with python3}
46e834
%py3_build
46e834
%endif
a00bcf
a00bcf
%install
46e834
%py2_install
46e834
%if %{with python3}
46e834
%py3_install
46e834
%endif
a00bcf
46e834
%if %{with tests}
8778f5
%check
46e834
export LANG=C.UTF-8
46e834
py.test-%{python2_version} -v tests
46e834
%if %{with python3}
46e834
py.test-%{python3_version} -v tests
46e834
%endif
46e834
%endif
a00bcf
46e834
%files -n python2-%{srcname}
a00bcf
%license LICENSE
a00bcf
%doc README.md
46e834
%{python2_sitelib}/%{modname}-*.egg-info/
46e834
%{python2_sitelib}/%{modname}/
46e834
46e834
%if %{with python3}
46e834
%files -n python3-%{srcname}
a00bcf
%license LICENSE
46e834
%doc README.md
46e834
%{python3_sitelib}/%{modname}-*.egg-info/
46e834
%{python3_sitelib}/%{modname}/
46e834
%endif
a00bcf
a00bcf
%changelog
732171
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.11-4
732171
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
732171
19ba07
* Mon Jul 16 2018 Tim Waugh <twaugh@redhat.com> - 0.0.11-3
19ba07
- Require six
19ba07
417503
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.11-2
417503
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
417503
a6718c
* Thu Jul 12 2018 Tim Waugh <twaugh@redhat.com> - 0.0.11-1
a6718c
- New upstream release 0.0.11
a6718c
cb567e
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.0.10-2
cb567e
- Rebuilt for Python 3.7
cb567e
5c9d7c
* Thu Apr 19 2018 Tomas Tomecek <ttomecek@redhat.com> - 0.0.10-1
5c9d7c
- New upstream release 0.0.10
5c9d7c
ef0586
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.7-2
ef0586
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ef0586
3834e2
* Thu Oct 05 2017 Tomas Tomecek <ttomecek@redhat.com> - 0.0.7-1
3834e2
- new upstream release: 0.0.7
3834e2
a594dc
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-10
a594dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a594dc
dd1c13
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-9
dd1c13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
dd1c13
76e37e
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.0.5-8
76e37e
- Rebuild for Python 3.6
76e37e
2ed479
* Tue Dec 06 2016 Adam Miller <maxamillion@fedoraproject.org> - 0.0.5-7
2ed479
- Patch to handle inheriting parent Dockerfile ENVs
2ed479
46e834
* Wed Sep 07 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.0.5-6
46e834
- Modernize spec
46e834
- Trivial fixes
46e834
40d3fe
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-5
40d3fe
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
40d3fe
25f12a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-4
25f12a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
25f12a
e936c1
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-3
e936c1
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e936c1
8778f5
* Fri Nov 06 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-2
8778f5
- %%check section
8778f5
566095
* Mon Sep 21 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-1
566095
- 0.0.5
566095
721670
* Thu Aug 27 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-1
721670
- 0.0.4
721670
a00bcf
* Tue Jun 30 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-2
a00bcf
- define macros for RHEL-6
a00bcf
a00bcf
* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-1
a00bcf
- 0.0.3
a00bcf
a00bcf
* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.2-1
a00bcf
- 0.0.2
a00bcf
a00bcf
* Thu Jun 18 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.1-1
a00bcf
- initial release