commit 43b7efdc6963f1eba2c88ff4af7c4c8a22306a15acdc037ca34ee154ea9279d9 Author: Steve Kowalik Date: Wed Mar 26 00:54:31 2025 +0000 - Lowercase metadata directory name. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-StrEnum?expand=0&rev=7 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/StrEnum-0.4.15.tar.gz b/StrEnum-0.4.15.tar.gz new file mode 100644 index 0000000..47c3d63 --- /dev/null +++ b/StrEnum-0.4.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab442e918760a39a3b07e7923c128ff13a0bbebc6a173cda67237acb738d7e49 +size 31544 diff --git a/python-StrEnum.changes b/python-StrEnum.changes new file mode 100644 index 0000000..0bba775 --- /dev/null +++ b/python-StrEnum.changes @@ -0,0 +1,16 @@ +------------------------------------------------------------------- +Wed Mar 26 00:54:11 UTC 2025 - Steve Kowalik + +- Lowercase metadata directory name. + +------------------------------------------------------------------- +Fri Jan 10 02:03:49 UTC 2025 - Steve Kowalik + +- Switch to GitHub tarball for tests, and run the testsuite. +- Add patch support-python-312.patch: + * Support configparser changes in Python 3.12. + +------------------------------------------------------------------- +Tue Jan 30 12:14:47 UTC 2024 - Dirk Müller + +- Initial package (0.4.15) diff --git a/python-StrEnum.spec b/python-StrEnum.spec new file mode 100644 index 0000000..f1efa88 --- /dev/null +++ b/python-StrEnum.spec @@ -0,0 +1,65 @@ +# +# spec file for package python-StrEnum +# +# 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-StrEnum +Version: 0.4.15 +Release: 0 +Summary: An Enum that inherits from str +License: MIT +URL: https://github.com/irgeek/StrEnum +Source: https://github.com/irgeek/StrEnum/archive/refs/tags/v%{version}.tar.gz#/StrEnum-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#irgeek/StrEnum#34 +Patch0: support-python-312.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Suggests: python-sphinx +Suggests: python-sphinx_rtd_theme +Suggests: python-myst-parser +BuildArch: noarch +%python_subpackages + +%description +An Enum that inherits from str. + +%prep +%autosetup -p1 -n StrEnum-%{version} +# We don't need coverage or linting +grep -v '^addopts' pytest.ini > new-pytest.ini +mv new-pytest.ini pytest.ini + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/strenum +%{python_sitelib}/strenum-%{version}.dist-info + +%changelog diff --git a/support-python-312.patch b/support-python-312.patch new file mode 100644 index 0000000..af89167 --- /dev/null +++ b/support-python-312.patch @@ -0,0 +1,25 @@ +From 896bef1b7e4a50c8b53d90c8d2fb5c0164f08ecd Mon Sep 17 00:00:00 2001 +From: Fabian Affolter +Date: Wed, 17 Jan 2024 17:15:30 +0100 +Subject: [PATCH] Replace SafeConfigParser and readfp + +--- + versioneer.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/versioneer.py b/versioneer.py +index 64fea1c..3aa5da3 100644 +--- a/versioneer.py ++++ b/versioneer.py +@@ -339,9 +339,9 @@ def get_config_from_root(root): + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() ++ parser = configparser.ConfigParser() + with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser.read_file(f) + VCS = parser.get("versioneer", "VCS") # mandatory + + def get(parser, name):