Blame python-dockerfile-parse.spec

46e8345
%if 0%{?rhel} && 0%{?rhel} <= 7
46e8345
%bcond_with python3
46e8345
%if 0%{?rhel} <= 6
8778f5f
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
46e8345
%{!?_licensedir:%global license %%doc}
a00bcfe
%endif
46e8345
%else
46e8345
%bcond_without python3
a00bcfe
%endif
a00bcfe
46e8345
%bcond_without tests
8778f5f
46e8345
%global srcname dockerfile-parse
46e8345
%global modname %(n=%{srcname}; echo ${n//-/_})
a00bcfe
46e8345
Name:           python-%{srcname}
5660952
Version:        0.0.5
76e37ed
Release:        8%{?dist}
a00bcfe
a00bcfe
Summary:        Python library for Dockerfile manipulation
a00bcfe
License:        BSD
46e8345
URL:            https://github.com/DBuildService/dockerfile-parse
46e8345
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
a00bcfe
2ed479a
# Patch to handle inheriting ENV vars from parent Dockerfiles
2ed479a
#
2ed479a
# Upstream PRs (merged into single patch here):
2ed479a
#   https://github.com/DBuildService/dockerfile-parse/pull/21
2ed479a
#   https://github.com/DBuildService/dockerfile-parse/pull/22
2ed479a
Patch0:         dockerfile-parse-0.0.5-parent_env.patch
2ed479a
a00bcfe
BuildArch:      noarch
a00bcfe
46e8345
%description
46e8345
%{summary}.
46e8345
46e8345
%package -n python2-%{srcname}
46e8345
Summary:        %{summary}
46e8345
%{?python_provide:%python_provide python2-%{srcname}}
a00bcfe
BuildRequires:  python2-devel
46e8345
%if 0%{?rhel} && 0%{?rhel} <= 7
a00bcfe
BuildRequires:  python-setuptools
8778f5f
BuildRequires:  pytest
46e8345
%else
46e8345
BuildRequires:  python2-setuptools
46e8345
BuildRequires:  python2-pytest
46e8345
%endif
8778f5f
46e8345
%description -n python2-%{srcname}
46e8345
%{summary}.
a00bcfe
46e8345
Python 2 version.
46e8345
46e8345
%if %{with python3}
46e8345
%package -n python3-%{srcname}
46e8345
Summary:        %{summary}
46e8345
%{?python_provide:%python_provide python3-%{srcname}}
a00bcfe
BuildRequires:  python3-devel
a00bcfe
BuildRequires:  python3-setuptools
46e8345
%if %{with tests}
8778f5f
BuildRequires:  python3-pytest
46e8345
%endif
a00bcfe
46e8345
%description -n python3-%{srcname}
46e8345
%{summary}.
a00bcfe
46e8345
Python 3 version.
46e8345
%endif
a00bcfe
a00bcfe
%prep
2ed479a
%setup -n %{srcname}-%{version}
2ed479a
2ed479a
%patch0 -p1
a00bcfe
a00bcfe
%build
46e8345
%py2_build
46e8345
%if %{with python3}
46e8345
%py3_build
46e8345
%endif
a00bcfe
a00bcfe
%install
46e8345
%py2_install
46e8345
%if %{with python3}
46e8345
%py3_install
46e8345
%endif
a00bcfe
46e8345
%if %{with tests}
8778f5f
%check
46e8345
export LANG=C.UTF-8
46e8345
py.test-%{python2_version} -v tests
46e8345
%if %{with python3}
46e8345
py.test-%{python3_version} -v tests
46e8345
%endif
46e8345
%endif
a00bcfe
46e8345
%files -n python2-%{srcname}
a00bcfe
%license LICENSE
a00bcfe
%doc README.md
46e8345
%{python2_sitelib}/%{modname}-*.egg-info/
46e8345
%{python2_sitelib}/%{modname}/
46e8345
46e8345
%if %{with python3}
46e8345
%files -n python3-%{srcname}
a00bcfe
%license LICENSE
46e8345
%doc README.md
46e8345
%{python3_sitelib}/%{modname}-*.egg-info/
46e8345
%{python3_sitelib}/%{modname}/
46e8345
%endif
a00bcfe
a00bcfe
%changelog
76e37ed
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.0.5-8
76e37ed
- Rebuild for Python 3.6
76e37ed
2ed479a
* Tue Dec 06 2016 Adam Miller <maxamillion@fedoraproject.org> - 0.0.5-7
2ed479a
- Patch to handle inheriting parent Dockerfile ENVs
2ed479a
46e8345
* Wed Sep 07 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.0.5-6
46e8345
- Modernize spec
46e8345
- Trivial fixes
46e8345
40d3fe7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-5
40d3fe7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
40d3fe7
25f12ae
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-4
25f12ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
25f12ae
e936c1e
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-3
e936c1e
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e936c1e
8778f5f
* Fri Nov 06 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-2
8778f5f
- %%check section
8778f5f
5660952
* Mon Sep 21 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-1
5660952
- 0.0.5
5660952
721670d
* Thu Aug 27 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.4-1
721670d
- 0.0.4
721670d
a00bcfe
* Tue Jun 30 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-2
a00bcfe
- define macros for RHEL-6
a00bcfe
a00bcfe
* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-1
a00bcfe
- 0.0.3
a00bcfe
a00bcfe
* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.2-1
a00bcfe
- 0.0.2
a00bcfe
a00bcfe
* Thu Jun 18 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.1-1
a00bcfe
- initial release