summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Popelka <jpopelka@redhat.com>2015-07-02 14:45:39 +0200
committerJiri Popelka <jpopelka@redhat.com>2015-07-02 14:45:39 +0200
commita00bcfeb5cd337b415bc3a1006a7688a896a68ab (patch)
tree14dd1758baf914085beb1b255aa3ca775ec24bad
parent2c654a53a79fc3831d68c2a82428788671713e58 (diff)
downloadpython-dockerfile-parse-a00bcfeb5cd337b415bc3a1006a7688a896a68ab.tar.gz
python-dockerfile-parse-a00bcfeb5cd337b415bc3a1006a7688a896a68ab.tar.xz
python-dockerfile-parse-a00bcfeb5cd337b415bc3a1006a7688a896a68ab.zip
import
-rw-r--r--.gitignore1
-rw-r--r--python-dockerfile-parse.spec112
-rw-r--r--sources1
3 files changed, 114 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..553be6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dockerfile-parse-2fee7d3622dc484034c6f115f08fd5e9ec78c011.tar.gz
diff --git a/python-dockerfile-parse.spec b/python-dockerfile-parse.spec
new file mode 100644
index 0000000..b0970b5
--- /dev/null
+++ b/python-dockerfile-parse.spec
@@ -0,0 +1,112 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+%if (0%{?fedora} >= 21 || 0%{?rhel} >= 8)
+%global with_python3 1
+%endif
+
+%global owner DBuildService
+%global project dockerfile-parse
+
+%global commit 2fee7d3622dc484034c6f115f08fd5e9ec78c011
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name: python-dockerfile-parse
+Version: 0.0.3
+Release: 2%{?dist}
+
+Summary: Python library for Dockerfile manipulation
+Group: Development/Tools
+License: BSD
+URL: https://github.com/%{owner}/%{project}
+Source0: https://github.com/%{owner}/%{project}/archive/%{commit}/%{project}-%{commit}.tar.gz
+
+BuildArch: noarch
+
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+Requires: python-setuptools
+
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+
+%description
+Python library for Dockerfile manipulation
+
+%if 0%{?with_python3}
+%package -n python3-%{project}
+Summary: Python 3 library for Dockerfile manipulation
+Group: Development/Tools
+License: BSD
+Requires: python3-setuptools
+
+%description -n python3-%{project}
+Python 3 library for Dockerfile manipulation
+%endif # with_python3
+
+%prep
+%setup -qn %{project}-%{commit}
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+
+%build
+# build python package
+%{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install --skip-build --root %{buildroot}
+
+
+%files
+%doc README.md
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%dir %{python2_sitelib}/dockerfile_parse
+%{python2_sitelib}/dockerfile_parse/*.*
+%{python2_sitelib}/dockerfile_parse-%{version}-py2.*.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{project}
+%doc README.md
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%dir %{python3_sitelib}/dockerfile_parse
+%dir %{python3_sitelib}/dockerfile_parse/__pycache__
+%{python3_sitelib}/dockerfile_parse/*.*
+%{python3_sitelib}/dockerfile_parse/__pycache__/*.py*
+%{python3_sitelib}/dockerfile_parse-%{version}-py3.*.egg-info
+%endif # with_python3
+
+%changelog
+* Tue Jun 30 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-2
+- define macros for RHEL-6
+
+* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.3-1
+- 0.0.3
+
+* Fri Jun 26 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.2-1
+- 0.0.2
+
+* Thu Jun 18 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.1-1
+- initial release
diff --git a/sources b/sources
index e69de29..ed47448 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5a2fbbb991dc4ff86d8a2baba4275391 dockerfile-parse-2fee7d3622dc484034c6f115f08fd5e9ec78c011.tar.gz