commit 4944a6a1d0ee9050f538da514134c9de89254d9884c48ba23f9f204739edccd2 Author: Tomáš Chvátal Date: Fri Apr 5 07:33:41 2019 +0000 Accepting request 691625 from home:jayvdb:py-new - Initial spec for v0.2.4 OBS-URL: https://build.opensuse.org/request/show/691625 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tpfd?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/drop-test-data-installation.patch b/drop-test-data-installation.patch new file mode 100644 index 0000000..dd21260 --- /dev/null +++ b/drop-test-data-installation.patch @@ -0,0 +1,8 @@ +--- tpfd-0.2.4-orig/setup.py 2019-04-05 08:53:40.970638340 +0700 ++++ tpfd-0.2.4/setup.py 2019-04-05 08:54:03.326802040 +0700 +@@ -24,4 +24,4 @@ + zip_safe=False, + classifiers=CLASSIFIERS, + install_requires=['parse'], +- data_files=['test/Test1.txt']) ++) diff --git a/python-tpfd.changes b/python-tpfd.changes new file mode 100644 index 0000000..a8d6bcd --- /dev/null +++ b/python-tpfd.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Apr 3 10:42:04 AM UTC 2019 - John Vandenberg + +- Initial spec for v0.2.4 diff --git a/python-tpfd.spec b/python-tpfd.spec new file mode 100644 index 0000000..d3fce72 --- /dev/null +++ b/python-tpfd.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-tpfd +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-tpfd +Version: 0.2.4 +Release: 0 +Summary: Text Parsing Function Dispatcher +License: MIT +Group: Development/Languages/Python +URL: https://github.com/erinxocon/tpfd +Source: https://github.com/erinxocon/tpfd/archive/v%{version}.tar.gz#/tpfd-%{version}.tar.gz +Patch0: drop-test-data-installation.patch +BuildRequires: %{python_module parse} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-parse +BuildArch: noarch +%python_subpackages + +%description +TPFD (Text Parsing Function Dispatcher) is an easy way to parse strings and execute +functions depending on their contents. + +Inspired by Flask and using Parse under the hood, TPFD allows you to decorate functions +with grammar rules and if a pattern that matches one of your grammar rules is found, +the function will be run with a set of keyword arguments you've specified passed to it! +Great for parsing logs and executing macros on what it finds! + +%prep +%setup -q -n tpfd-%{version} +%patch0 -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +cd test +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} +$python test_parse.py +} + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/* + +%changelog diff --git a/tpfd-0.2.4.tar.gz b/tpfd-0.2.4.tar.gz new file mode 100644 index 0000000..6d102bc --- /dev/null +++ b/tpfd-0.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0887c5d81e95d430b8138f5ed234ea89c55de88e1959c79b06a8a5e3ecff03b +size 5972