From d8c3dcc00dcb52d4a078b7c0cc148bcf53a67155e8e4810192b99bd7c26457bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 15 May 2025 10:46:47 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-application?expand=0&rev=5 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + examples_to_py3k.patch | 48 ++++++++++++++++++++ python-application.changes | 75 ++++++++++++++++++++++++++++++++ python-application.spec | 73 +++++++++++++++++++++++++++++++ python3-application-3.0.3.tar.gz | 3 ++ 6 files changed, 223 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 examples_to_py3k.patch create mode 100644 python-application.changes create mode 100644 python-application.spec create mode 100644 python3-application-3.0.3.tar.gz 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/examples_to_py3k.patch b/examples_to_py3k.patch new file mode 100644 index 0000000..dae19bc --- /dev/null +++ b/examples_to_py3k.patch @@ -0,0 +1,48 @@ +--- + examples/config.py | 2 +- + examples/debug.py | 2 +- + examples/notification.py | 2 +- + examples/process.py | 2 +- + examples/singleton.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +--- a/examples/config.py ++++ b/examples/config.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + """Example of reading application settings from a configuration file""" + +--- a/examples/debug.py ++++ b/examples/debug.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + """Example of using the debug facilities of python-application""" + +--- a/examples/notification.py ++++ b/examples/notification.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + from time import time + from zope.interface import implements +--- a/examples/process.py ++++ b/examples/process.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + """Example of controlling the process behavior using the process module""" + +--- a/examples/singleton.py ++++ b/examples/singleton.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + from application.python.types import Singleton + diff --git a/python-application.changes b/python-application.changes new file mode 100644 index 0000000..d1cd104 --- /dev/null +++ b/python-application.changes @@ -0,0 +1,75 @@ +------------------------------------------------------------------- +Tue May 13 13:46:31 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Mon Aug 30 09:56:56 UTC 2021 - Matej Cepl + +- Add examples_to_py3k.patch to remove py2k shebangs + (gh#AGProjects/python3-application#2). + +------------------------------------------------------------------- +Fri Aug 27 13:09:15 UTC 2021 - Martin Hauke + +- Update to version 3.0.3 + * Fixed writing process pid. +- Update to version 3.0.2 + * Fixed queue. +- Update to version 3.0.1 + * Fixed crash when using capture_output function. +- Update to version 3.0.0 + * Migrate to python3. +- Update to version 2.8.0 + * Fixed issue with the syslog handler and null bytes in messages. + * Call handleError on SyslogHandler when exception happens during + emit. + * Added some utility functions for setting up the log system + + Added set_handler function to set the main handler used by + logging (it will replace all existing handlers on the root + logger). + + Added capture_output function to capture and divert standard + output and standard error to the logging system. + * Replaced start_syslog with use_syslog and deprecated the + former. + * Improved detection of non-interactive mode. + * Renamed IfNotInteractive to WhenNotInteractive. + * Use the real path for runtime and config directories (follow + symlinks). + * Added daemon property on Process to check if it's in daemon + mode or not. + * Check exc_type instead of exc_value in the context manager's + __exit__ . + * Added module level log function to the log module similar to + logging.log . + * Use the with statement instead of try/finally. + * Fixed broad exception statement. + * Normalize names for descriptor method arguments. + * Removed docstrings from internal functions. + * Refactored configuration and runtime settings on Process. + * Make the local_root undefined when running from system binary + paths. + * Only ignore OSError in unlink wrapper. + * Use the new octal notation for file modes. + * Fixed spelling in exception message. + * Ordered imports alphabetically. + * Explicitly use python2 in shebang lines. + +------------------------------------------------------------------- +Sun Nov 17 18:34:40 UTC 2019 - Martin Hauke + +- Convert inline changelog to python-application.changes +- Drop patch (obsolete) + * python-application-1.0.9.dif + +------------------------------------------------------------------- +Thu Sep 27 00:00:00 UTC 2007 - poeml@suse.de + +- fixed build, adding python-application-1.0.9.dif + +------------------------------------------------------------------- +Mon Sep 24 00:00:00 UTC 2007 - Peter Nixon + +- Initial release + + diff --git a/python-application.spec b/python-application.spec new file mode 100644 index 0000000..b7d3acd --- /dev/null +++ b/python-application.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-application +# +# Copyright (c) 2025 SUSE LLC +# +# 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/ +# + + +Name: python-application +Version: 3.0.3 +Release: 0 +Summary: Basic building blocks for Python applications +License: LGPL-2.1-or-later +Group: Development/Libraries/Python +URL: https://github.com/AGProjects/python3-application +Source: https://github.com/AGProjects/python3-application/archive/refs/tags/%{version}.tar.gz#/python3-application-%{version}.tar.gz +# PATCH-FIX-UPSTREAM examples_to_py3k.patch gh#AGProjects/python3-application#2 mcepl@suse.com +# Replace py2k shebangs with py3k ones +Patch0: examples_to_py3k.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-zope.interface +BuildArch: noarch +%python_subpackages + +%description +This module provides some basic components that can be used to simplify +building Python applications. + +The components included by this package encapsulate the functionality to +handle the following tasks: + + - UNIX process management (forking, signal handling, pid file creation) + - A very simple to use interface to handle .ini configuration files. + - An extensible system logger for console and/or syslog. + - Miscellaneous utilities and helpers. + - Memory troubleshooting and execution timing. + - Communicate inside the application using a notification system. + - Manage the version number for applications, modules and packages. + +%prep +%autosetup -p1 -n python3-application-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# testsuite does not exist yet + +%files %{python_files} +%license LICENSE +%doc ChangeLog NEWS README examples/ +%{python_sitelib}/application +%{python_sitelib}/python*_application* + +%changelog diff --git a/python3-application-3.0.3.tar.gz b/python3-application-3.0.3.tar.gz new file mode 100644 index 0000000..ad9668f --- /dev/null +++ b/python3-application-3.0.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23b200ee1e339bc7fd18375543650e64b0d8ed5165a7bc8cef6a584cc80f9f9b +size 63585