From 792498f5c77113f1bbb7caef009d3298e9c90d1b Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Feb 20 2019 23:38:18 +0000 Subject: Initial package import --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..896b726 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/python-fields-5.0.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index f9ed459..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-fields - -The python-fields package \ No newline at end of file diff --git a/python-fields-5.0.0-sphinx-1.3.patch b/python-fields-5.0.0-sphinx-1.3.patch new file mode 100644 index 0000000..2f90aba --- /dev/null +++ b/python-fields-5.0.0-sphinx-1.3.patch @@ -0,0 +1,11 @@ +--- a/docs/conf.py 2019-02-14 15:06:58.494409885 -0800 ++++ b/docs/conf.py 2019-02-14 15:07:18.862800941 -0800 +@@ -11,7 +11,7 @@ + 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', + 'sphinx.ext.viewcode', +- 'sphinxcontrib.napoleon' ++ 'sphinx.ext.napoleon' + ] + if os.getenv('SPELLCHECK'): + extensions += 'sphinxcontrib.spelling', diff --git a/python-fields.rpmlintrc b/python-fields.rpmlintrc new file mode 100644 index 0000000..0e8d8ea --- /dev/null +++ b/python-fields.rpmlintrc @@ -0,0 +1,5 @@ +# KNOWN BUGS +addFilter(r'(file-not-utf8|wrong-file-end-of-line-encoding) /usr/share/doc/python-fields-doc/html/objects.inv( |$)') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (eg|hynek|init|repr)( |$)') diff --git a/python-fields.spec b/python-fields.spec new file mode 100644 index 0000000..94c6dcc --- /dev/null +++ b/python-fields.spec @@ -0,0 +1,87 @@ +%global srcname fields + +Name: python-%{srcname} +Version: 5.0.0 +Release: 1%{?dist} +Summary: Container class boilerplate killer + +License: BSD +URL: https://github.com/ionelmc/%{name} +Source0: https://github.com/ionelmc/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz + +# Compatibility with python-sphinx >= 1.3, already applied upstream +Patch0: %{name}-5.0.0-sphinx-1.3.patch + +BuildArch: noarch + +%description +Container class boilerplate killer. + +Features: +- Human-readable __repr__ +- Complete set of comparison methods +- Keyword and positional argument support. Works like a normal class - you can + override just about anything in the subclass (eg: a custom __init__). In + contrast, hynek/characteristic forces different call schematics and calls + your __init__ with different arguments. + +%package doc +Summary: Documentation for '%{name}' +BuildRequires: python%{python3_pkgversion}-sphinx +BuildRequires: python%{python3_pkgversion}-sphinx-theme-py3doc-enhanced + +%description doc +HTML API documentation for the '%{srcname}' Python module. + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-pytest-benchmark + +%if !0%{?rhel} || 0%{?rhel} >= 8 +Recommends: %{name}-doc = %{version}-%{release} +%endif # rhel + +%description -n python%{python3_pkgversion}-%{srcname} +Container class boilerplate killer. + +Features: +- Human-readable __repr__ +- Complete set of comparison methods +- Keyword and positional argument support. Works like a normal class - you can + override just about anything in the subclass (eg: a custom __init__). In + contrast, hynek/characteristic forces different call schematics and calls + your __init__ with different arguments. + +%prep +%autosetup -p1 + +%build +%py3_build +PYTHONPATH=$PWD/src sphinx-build -b html docs docs/_build/html +rm -rf docs/_build/html/.buildinfo docs/_build/html/.doctrees + +%install +%py3_install + +%check +# Perf tests require unmaintained 'characteristic' module +PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} \ + --ignore=tests/test_perf.py \ + tests + +%files doc +%license LICENSE +%doc docs/_build/html + +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc AUTHORS.rst CHANGELOG.rst README.rst +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ + +%changelog +* Thu Feb 14 2019 Scott K Logan - 5.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..075f2cd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (python-fields-5.0.0.tar.gz) = feaba23b98271936d6dae20b1001978483c0fe89ccf217637fac536ae5814c2c02bac1c3ddc2a86dc0d2419a3b3658871018c0ea4b7905e1c2649aa905b8e5a3