[packages/python-parsedatetime] new, version 1.5
glen
glen at pld-linux.org
Fri Dec 4 13:47:33 CET 2015
commit d4dec6edb79181e17c99ceb9ef97cfca7cf8f0b7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Dec 4 14:47:00 2015 +0200
new, version 1.5
based on fedora package, 937e225
fix-non-executable-script-init.patch | 8 +++
python-parsedatetime.spec | 115 +++++++++++++++++++++++++++++++++++
2 files changed, 123 insertions(+)
---
diff --git a/python-parsedatetime.spec b/python-parsedatetime.spec
new file mode 100644
index 0000000..33d0162
--- /dev/null
+++ b/python-parsedatetime.spec
@@ -0,0 +1,115 @@
+#
+# Conditional build:
+%bcond_without doc # don't build doc
+%bcond_without tests # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module parsedatetime
+Summary: Parse human-readable date/time strings in Python
+Name: python-%{module}
+Version: 1.5
+Release: 1
+License: Apache v2.0
+Group: Libraries/Python
+Source0: https://github.com/bear/%{module}/archive/v%{version}/%{module}-%{version}.tar.gz
+# Source0-md5: f7b6b8258728ca9aa2ef536b3f221baf
+Patch0: fix-non-executable-script-init.patch
+URL: https://github.com/bear/parsedatetime
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.713
+%if %{with python2}
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+%if %{with doc}
+BuildRequires: epydoc
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+parsedatetime is a Python module that can parse human-readable
+date/time strings.
+
+%package doc
+Summary: Documentation for the parsedatetime Python module
+Group: Documentation
+
+%description doc
+This package contains the generated HTML documentation for the
+parsedatetime python module
+
+%package -n python3-%{module}
+Summary: Parse human-readable date/time strings in Python
+Group: Libraries/Python
+
+%description -n python3-%{module}
+parsedatetime is a Python module that can parse human-readable
+date/time strings.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch0 -p1
+
+# Fixes spurious-executable-perm warning
+chmod 644 implementation_notes.txt
+
+%build
+%if %{with python2}
+%py_build
+%{?with_tests:%{__python} run_tests.py}
+%endif
+
+%if %{with python3}
+%py3_build
+%{?with_tests:%{__python3} run_tests.py test}
+%endif
+
+%if %{with doc}
+epydoc --html --config epydoc.conf
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt
+%doc AUTHORS.txt CHANGES.txt INSTALL.txt README.rst THANKS.txt
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}-%{version}-*.egg-info
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc LICENSE.txt
+%doc AUTHORS.txt CHANGES.txt INSTALL.txt README.rst THANKS.txt
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}*.egg-info
+%endif
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc docs/ examples/ implementation_notes.txt locale_date_grouping_notes.txt
+%endif
diff --git a/fix-non-executable-script-init.patch b/fix-non-executable-script-init.patch
new file mode 100644
index 0000000..a7a00b9
--- /dev/null
+++ b/fix-non-executable-script-init.patch
@@ -0,0 +1,8 @@
+diff -up parsedatetime-1.4/parsedatetime/__init__.py.orig parsedatetime-1.4/parsedatetime/__init__.py
+--- parsedatetime-1.4/parsedatetime/__init__.py.orig 2015-06-04 20:20:30.547391210 +0200
++++ parsedatetime-1.4/parsedatetime/__init__.py 2015-06-04 20:20:36.820432846 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ #
+ # vim: sw=2 ts=2 sts=2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-parsedatetime.git/commitdiff/d4dec6edb79181e17c99ceb9ef97cfca7cf8f0b7
More information about the pld-cvs-commit
mailing list