ralph pushed to python-munch (f20). "Initial import (#1210969)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 18:10:09 UTC 2015


>From ece3571b8242c9eda89d28035f802bc71ed86004 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean at redhat.com>
Date: Tue, 14 Apr 2015 13:50:03 -0400
Subject: Initial import (#1210969)


diff --git a/.gitignore b/.gitignore
index e69de29..df39c2c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/munch-2.0.2.tar.gz
diff --git a/python-munch.spec b/python-munch.spec
new file mode 100644
index 0000000..60c1e25
--- /dev/null
+++ b/python-munch.spec
@@ -0,0 +1,107 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%{!?_licensedir: %global license %%doc}
+
+%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
+
+%global modname munch
+
+Name:               python-munch
+Version:            2.0.2
+Release:            2%{?dist}
+Summary:            A dot-accessible dictionary (a la JavaScript objects)
+
+Group:              Development/Libraries
+License:            MIT
+URL:                http://pypi.python.org/pypi/munch
+Source0:            https://pypi.python.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz
+
+BuildArch:          noarch
+
+BuildRequires:      python2-devel
+BuildRequires:      python-setuptools
+
+%if 0%{?with_python3}
+BuildRequires:      python3-devel
+BuildRequires:      python3-setuptools
+%endif
+
+%description
+munch is a fork of David Schoonover's **Bunch** package, providing similar
+functionality. 99% of the work was done by him, and the fork was made
+mainly for lack of responsiveness for fixes and maintenance on the original
+code.
+
+Munch is a dictionary that supports attribute-style access, a la
+JavaScript.
+
+%if 0%{?with_python3}
+%package -n python3-munch
+Summary:            A dot-accessible dictionary (a la JavaScript objects)
+Group:              Development/Libraries
+
+%description -n python3-munch
+munch is a fork of David Schoonover's **Bunch** package, providing similar
+functionality. 99% of the work was done by him, and the fork was made
+mainly for lack of responsiveness for fixes and maintenance on the original
+code.
+
+Munch is a dictionary that supports attribute-style access, a la
+JavaScript.
+%endif
+
+%prep
+%setup -q -n %{modname}-%{version}
+
+# Remove shebang to make rpmlint happy.
+sed -i '/\/usr\/bin\/python/d' munch/__init__.py
+
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+%build
+%{__python2} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
+%endif
+%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+
+%files
+%doc README.md
+%license LICENSE.txt
+%{python2_sitelib}/%{modname}/
+%{python2_sitelib}/%{modname}-%{version}*
+
+%if 0%{?with_python3}
+%files -n python3-munch
+%doc README.md
+%license LICENSE.txt
+%{python3_sitelib}/%{modname}/
+%{python3_sitelib}/%{modname}-%{version}*
+%endif
+
+%changelog
+* Sun Apr 12 2015 Ralph Bean <rbean at redhat.com> - 2.0.2-2
+- Remove shebang to make rpmlint happy.
+
+* Sat Apr 11 2015 Ralph Bean <rbean at redhat.com> - 2.0.2-1
+- Initial package for Fedora
diff --git a/sources b/sources
index e69de29..1258d57 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6bff44f4f33b0af4f6f991a996f5a314  munch-2.0.2.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-munch.git/commit/?h=f20&id=ece3571b8242c9eda89d28035f802bc71ed86004


More information about the scm-commits mailing list