summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2015-04-02 13:37:07 -0600
committerKen Dreyer <ktdreyer@ktdreyer.com>2015-04-02 13:37:07 -0600
commit04d0cdb760b6929e15988f4ba05e8ac298a60af9 (patch)
treeb6a6500882e62fed7f7b1f7decc3b9a8cbb746e6
downloadpython-tambo-04d0cdb760b6929e15988f4ba05e8ac298a60af9.tar.gz
python-tambo-04d0cdb760b6929e15988f4ba05e8ac298a60af9.tar.xz
python-tambo-04d0cdb760b6929e15988f4ba05e8ac298a60af9.zip
Initial package
-rw-r--r--.gitignore1
-rw-r--r--python-tambo.spec103
-rw-r--r--sources1
3 files changed, 105 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..99f3ce0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/tambo-0.0.9.tar.gz
diff --git a/python-tambo.spec b/python-tambo.spec
new file mode 100644
index 0000000..395c34e
--- /dev/null
+++ b/python-tambo.spec
@@ -0,0 +1,103 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%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())")}
+%endif
+
+%global pkgname tambo
+
+Name: python-%{pkgname}
+Version: 0.0.9
+Release: 1%{?dist}
+Summary: A command line object dispatcher
+Group: Development/Languages
+
+License: MIT
+URL: https://github.com/alfredodeza/tambo
+
+Source0: https://pypi.python.org/packages/source/t/%{pkgname}/%{pkgname}-%{version}.tar.gz
+
+BuildArch: noarch
+BuildRequires: pytest
+BuildRequires: python2-devel
+BuildRequires: python-mock
+BuildRequires: python-setuptools
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-pytest
+BuildRequires: python3-mock
+BuildRequires: python3-setuptools
+%endif # with_python3
+
+%description
+Use any argument parser you want for each sub-command. Easily manage each
+command as a self-contained application.
+
+%if 0%{?with_python3}
+%package -n python3-tambo
+Summary: A command line object dispatcher
+Group: Development/Languages
+Requires: python3
+
+%description -n python3-tambo
+Use any argument parser you want for each sub-command. Easily manage each
+command as a self-contained application.
+%endif # with_python3
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif # with_python3
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+%install
+%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif # with_python3
+
+
+%check
+export PYTHONPATH=$(pwd)
+
+py.test-%{python_version} -v tambo/tests
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+py.test-%{python3_version} -v tambo/tests
+popd
+%endif # with_python3
+
+%files
+%{!?_licensedir:%global license %%doc}
+%doc README.rst
+%license LICENSE
+%{python2_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-tambo
+%{python3_sitelib}/*
+%license LICENSE
+%doc README.rst
+%endif # with_python3
+
+
+%changelog
+* Thu Apr 02 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.0.9-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..9e2bcb2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e5f6249852a16a32240f3bd92af3a96f tambo-0.0.9.tar.gz