From e8515a218b9e5912fcaddcf703fac398958d1518df64747e1b84f567fe92bbd6 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 20 Oct 2025 09:49:16 +0000 Subject: [PATCH] - Fix -doc package generation, we are adding the -doc to the suffix, no need to have a subpackage here, multibuild does the trick. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-atomicwrites?expand=0&rev=26 --- .gitattributes | 23 +++++++ .gitignore | 1 + _multibuild | 3 + atomicwrites-1.4.1.tar.gz | 3 + python-atomicwrites.changes | 126 ++++++++++++++++++++++++++++++++++++ python-atomicwrites.spec | 97 +++++++++++++++++++++++++++ sphinx8.patch | 10 +++ 7 files changed, 263 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 atomicwrites-1.4.1.tar.gz create mode 100644 python-atomicwrites.changes create mode 100644 python-atomicwrites.spec create mode 100644 sphinx8.patch 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/_multibuild b/_multibuild new file mode 100644 index 0000000..58ef5ee --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + doc + diff --git a/atomicwrites-1.4.1.tar.gz b/atomicwrites-1.4.1.tar.gz new file mode 100644 index 0000000..550fb4d --- /dev/null +++ b/atomicwrites-1.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11 +size 14227 diff --git a/python-atomicwrites.changes b/python-atomicwrites.changes new file mode 100644 index 0000000..8b1e6e7 --- /dev/null +++ b/python-atomicwrites.changes @@ -0,0 +1,126 @@ +------------------------------------------------------------------- +Mon Oct 20 09:46:50 UTC 2025 - Daniel Garcia + +- Fix -doc package generation, we are adding the -doc to the suffix, + no need to have a subpackage here, multibuild does the trick. + +------------------------------------------------------------------- +Thu Sep 25 10:40:31 UTC 2025 - Daniel Garcia + +- Build for modern python in SLE15 + +------------------------------------------------------------------- +Fri Jun 13 05:35:08 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Mon Nov 11 13:34:27 UTC 2024 - Daniel Garcia + +- Add sphinx8.patch to support sphinx8 + +------------------------------------------------------------------- +Mon Jul 25 21:00:19 UTC 2022 - Dirk Müller + +- update to 1.4.1: + * package is now unmaintained + * python 3.8 support + * README updates + * Support ppc64le + +------------------------------------------------------------------- +Fri Jan 28 21:18:35 UTC 2022 - Matej Cepl + +- Rewrite into proper multibuild style. + +------------------------------------------------------------------- +Tue May 12 08:51:32 UTC 2020 - Dirk Mueller + +- update to 1.4.0: + * Update unsupported python versions + * use fspath to ensure path is str or bytes + +------------------------------------------------------------------- +Mon Oct 14 11:35:28 UTC 2019 - Matej Cepl + +- Replace %fdupes -s with plain %fdupes; hardlinks are better. + +------------------------------------------------------------------- +Fri Mar 1 09:59:54 UTC 2019 - Ondřej Súkup + +- update to 1.3.0 + * Restore ability to use tempfile kwargs other than dir + * Avoid API breakage under Python 2 + * Passes kwargs through AtomicWriter to tempfile.NamedTemporaryFile + +------------------------------------------------------------------- +Tue Dec 4 13:06:02 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Wed Jul 18 11:56:07 UTC 2018 - tchvatal@suse.com + +- Versionify the provides to make old brp-checks happy + +------------------------------------------------------------------- +Sun Jun 10 23:51:43 UTC 2018 - jengelh@inai.de + +- Drop other-OS mentions from description. + +------------------------------------------------------------------- +Thu Jun 7 17:16:00 UTC 2018 - toddrme2178@gmail.com + +- Create separate -doc subpackage to build docs. +- Run tests in -doc subpackage to avoid dependency loop with + python-pytest. +- Use license tag + +------------------------------------------------------------------- +Fri Jun 30 16:49:02 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec + +------------------------------------------------------------------- +Wed Sep 21 02:05:33 UTC 2016 - arun@gmx.de + +- update to version 1.1.5: + * Fix toxfile (#21) + * Make atomic_write work on paths with no directory separator (#20) + * Fix formatting + * Skip stylecheck under py26 + * Add contributing.rst + * Fix tox.ini + +------------------------------------------------------------------- +Sun May 8 07:16:22 UTC 2016 - arun@gmx.de + +- specfile: + * updated source url to files.pythonhosted.org + +------------------------------------------------------------------- +Sat Mar 26 04:20:01 UTC 2016 - arun@gmx.de + +- update to version 1.0.0: + * Fix unintentional exception clobbering when rollback fails + * Remove unused variable (fixes an unused variable warning) + * Update copyright notice + * Fix appveyor build + +------------------------------------------------------------------- +Mon Feb 15 18:11:26 UTC 2016 - arun@gmx.de + +- update to version 0.1.9: + * Fix UnboundLocalError + +------------------------------------------------------------------- +Tue Jan 19 11:45:45 UTC 2016 - sleep_walker@opensuse.org + +- clean the spec file (not only) with spec-cleaner +- fix %check part + +------------------------------------------------------------------- +Mon Jan 18 23:25:46 UTC 2016 - sleep_walker@opensuse.org + +- let there be python3-atomicwrites + diff --git a/python-atomicwrites.spec b/python-atomicwrites.spec new file mode 100644 index 0000000..e31d15e --- /dev/null +++ b/python-atomicwrites.spec @@ -0,0 +1,97 @@ +# +# spec file for package python-atomicwrites +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "doc" +%define psuffix -doc +%bcond_without doc +%else +%define psuffix %{nil} +%bcond_with doc +%endif + +%{?sle15_python_module_pythons} +Name: python-atomicwrites%{psuffix} +Version: 1.4.1 +Release: 0 +Summary: Atomic file writes for Python +License: MIT +Group: Development/Languages/Python +URL: https://github.com/untitaker/python-atomicwrites +Source: https://files.pythonhosted.org/packages/source/a/atomicwrites/atomicwrites-%{version}.tar.gz +# PATCH-FIX-OPENSUSE sphinx8.patch -- daniel.garcia@suse.com +Patch0: sphinx8.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with doc} +BuildRequires: %{modern_python}-Sphinx +BuildRequires: %{python_module atomicwrites} +BuildRequires: %{python_module pytest} +%endif +%python_subpackages + +%description +Atomic file writes for python3. +Features that distinguish it from other similar libraries: + +- Race-free assertion that the target file doesn't yet exist. This can be + controlled with the 'overwrite' parameter. + +- High-level API that wraps a very flexible class-based API. + +%prep +%autosetup -p1 -n atomicwrites-%{version} +rm -rf atomicwrites.egg-info + +%build +%if %{without doc} +%pyproject_wheel +%else +pushd docs +make html +rm _build/html/.buildinfo +popd +%endif + +%install +%if %{without doc} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with doc} +%pytest +%endif + +%files %{python_files} +%defattr(-,root,root,-) +%doc README.rst +%license LICENSE +%if %{without doc} +%{python_sitelib}/atomicwrites +%{python_sitelib}/atomicwrites-%{version}.dist-info +%else +%doc docs/_build/html +%endif + +%changelog diff --git a/sphinx8.patch b/sphinx8.patch new file mode 100644 index 0000000..12e1073 --- /dev/null +++ b/sphinx8.patch @@ -0,0 +1,10 @@ +Index: atomicwrites-1.4.1/docs/conf.py +=================================================================== +--- atomicwrites-1.4.1.orig/docs/conf.py ++++ atomicwrites-1.4.1/docs/conf.py +@@ -105,4 +105,4 @@ epub_copyright = '2015, Markus Unterwadi + epub_exclude_files = ['search.html'] + + # Example configuration for intersphinx: refer to the Python standard library. +-intersphinx_mapping = {'http://docs.python.org/': None} ++intersphinx_mapping = {'python': ('http://docs.python.org/', None)}