]> git.pld-linux.org Git - packages/python-parsedatetime.git/commitdiff
new, version 1.5 auto/th/python-parsedatetime-1.5-1
authorElan Ruusamäe <glen@delfi.ee>
Fri, 4 Dec 2015 12:47:00 +0000 (14:47 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 4 Dec 2015 12:47:00 +0000 (14:47 +0200)
based on fedora package, 937e225

fix-non-executable-script-init.patch [new file with mode: 0644]
python-parsedatetime.spec [new file with mode: 0644]

diff --git a/fix-non-executable-script-init.patch b/fix-non-executable-script-init.patch
new file mode 100644 (file)
index 0000000..a7a00b9
--- /dev/null
@@ -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
diff --git a/python-parsedatetime.spec b/python-parsedatetime.spec
new file mode 100644 (file)
index 0000000..33d0162
--- /dev/null
@@ -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
This page took 0.130096 seconds and 4 git commands to generate.