summaryrefslogtreecommitdiffstats
path: root/python/python-volatile.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python/python-volatile.spec')
-rw-r--r--python/python-volatile.spec63
1 files changed, 63 insertions, 0 deletions
diff --git a/python/python-volatile.spec b/python/python-volatile.spec
new file mode 100644
index 0000000..78c0db8
--- /dev/null
+++ b/python/python-volatile.spec
@@ -0,0 +1,63 @@
+%global srcname volatile
+
+Name: python-%{srcname}
+Version: 2.1.0
+Release: 1%{?dist}
+Summary: A small extension for the tempfile module
+License: MIT
+URL: https://github.com/mbr/volatile
+Source0: %{pypi_source}
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+
+%global _description %{expand:
+Temporary files and directories.
+
+Contains replacement for tempfile.NamedTemporaryFile that does not delete the
+file on close(), but still unlinks it after the context manager ends, as well as
+a mkdtemp-based temporary directory implementation.
+
+- Mostly reuses the stdlib implementations, supporting the same signatures.
+- Due to that, uses the OS’s built-in temporary file facilities, no custom
+ schemes.
+- Tested on Python 2.6+ and 3.3+}
+
+%description %_description
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+
+%description -n python3-%{srcname} %_description
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+
+
+%build
+%py3_build
+
+
+%install
+%py3_install
+
+
+%check
+%{python3} setup.py test
+
+
+%files -n python3-%{srcname}
+# TODO ask upstream to include license
+%doc README.rst
+%{python3_sitelib}/%{srcname}/
+%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
+
+
+%changelog
+* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
+- Initial package