[python-croniter] initial import (#1068644)
Pádraig Brady
pbrady at fedoraproject.org
Thu Feb 27 15:02:36 UTC 2014
commit 924ee77ca6e842afa7841ada47ab3665e41b2093
Author: Pádraig Brady <P at draigBrady.com>
Date: Thu Feb 27 15:00:17 2014 +0000
initial import (#1068644)
.gitignore | 1 +
python-croniter.spec | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b9aa2f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/croniter-0.3.4.zip
diff --git a/python-croniter.spec b/python-croniter.spec
new file mode 100644
index 0000000..797bf7b
--- /dev/null
+++ b/python-croniter.spec
@@ -0,0 +1,107 @@
+# Created by pyp2rpm-1.0.1
+%global pypi_name croniter
+
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python}
+%{!?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
+
+Name: python-%{pypi_name}
+Version: 0.3.4
+Release: 2%{?dist}
+Summary: Iteration for datetime object with cron like format
+
+License: MIT
+URL: http://github.com/kiorky/croniter
+Source0: https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.zip
+BuildArch: noarch
+
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+
+# For tests
+BuildRequires: python-dateutil
+BuildRequires: pytz
+
+Requires: python-dateutil
+
+%description
+Croniter provides iteration for datetime object with cron like format.
+
+%if 0%{?with_python3}
+%package -n python3-%{pypi_name}
+Summary: Iteration for datetime object with cron like format
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-dateutil
+BuildRequires: python3-pytz
+
+Requires: python3-dateutil
+
+%description -n python3-%{pypi_name}
+Croniter provides iteration for datetime object with cron like format.
+%endif
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+# Remove reundant script header to avoid rpmlint warnings
+find -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
+
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif
+
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
+
+%check
+PYTHONPATH=%{buildroot}%{python2_sitelib}/ %{__python2} -m unittest %{pypi_name}.tests.test_croniter
+rm -fr %{buildroot}%{python2_sitelib}/%{pypi_name}/tests/
+
+%if 0%{?with_python3}
+PYTHONPATH=%{buildroot}%{python3_sitelib}/ %{__python3} -m unittest discover -s %{buildroot}%{python3_sitelib}/%{pypi_name}/tests -p 'test_*.py'
+rm -fr %{buildroot}%{python3_sitelib}/%{pypi_name}/tests/
+%endif
+
+
+%files
+%doc README.rst docs/LICENSE
+%{python2_sitelib}/%{pypi_name}
+%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{pypi_name}
+%doc README.rst docs/LICENSE
+%{python3_sitelib}/%{pypi_name}
+%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%endif
+
+
+%changelog
+* Fri Feb 21 2014 Pádraig Brady <P at draigBrady.com> - 0.3.4-2
+- Initial package.
diff --git a/sources b/sources
index e69de29..b924384 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+0e82c181071558136d63ff3203f91290 croniter-0.3.4.zip
More information about the scm-commits
mailing list