diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2024-01-20 01:39:53 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2024-01-20 01:39:53 +0000 |
commit | e2b166a37887e4a38359dfcff004f8d746280eca (patch) | |
tree | 3cf24b83b07d1b09d77e0f5c5ca3d57f53c6ea19 | |
parent | 3c3508c76a2cdc4ddc07f18d676e578a49b51ade (diff) |
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 39.patch | 46 | ||||
-rw-r--r-- | python-sysrsync.spec | 66 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 114 insertions, 0 deletions
@@ -0,0 +1 @@ +/sysrsync-1.1.1.tar.gz diff --git a/39.patch b/39.patch new file mode 100644 index 0000000..11346d5 --- /dev/null +++ b/39.patch @@ -0,0 +1,46 @@ +From 69ff19adde4c70c739bf5a64a7cd7758fb25536d Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <code@musicinmybrain.net> +Date: Fri, 19 Jan 2024 20:09:02 -0500 +Subject: [PATCH 1/2] Add build-system.requires to pyproject.toml + +This allows us to build the package with, e.g., python3 -m build +--- + pyproject.toml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pyproject.toml b/pyproject.toml +index 015024b..ca86fb0 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,3 +1,6 @@ ++[build-system] ++requires = ["setuptools", "toml"] ++ + [tool] + [tool.poetry] + name = "sysrsync" + +From cdedcfb11696f6af5c738658479a3b6ec3dbc7ca Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <code@musicinmybrain.net> +Date: Fri, 19 Jan 2024 20:11:28 -0500 +Subject: [PATCH 2/2] Fix typo in excluding tests from wheels + +The wheels currently on PyPI look OK, but this keeps tests from being +inadvertently included when wheels are built by other means. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 16f6655..f3ad689 100644 +--- a/setup.py ++++ b/setup.py +@@ -15,7 +15,7 @@ + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/gchamon/sysrsync", +- packages=setuptools.find_packages(exclude=['tests']), ++ packages=setuptools.find_packages(exclude=['test']), + platforms='any', + classifiers=[ + "Programming Language :: Python :: 3", diff --git a/python-sysrsync.spec b/python-sysrsync.spec new file mode 100644 index 0000000..acefc48 --- /dev/null +++ b/python-sysrsync.spec @@ -0,0 +1,66 @@ +Name: python-sysrsync +Version: 1.1.1 +Release: %autorelease +Summary: Simple and safe python wrapper for calling system rsync + +# SPDX +License: MIT +URL: https://github.com/gchamon/sysrsync +# PyPI source distributions lack tests; use the GitHub archive +Source: %{url}/archive/%{version}/sysrsync-%{version}.tar.gz + +# Declare build-system dependencies and correctly exclude tests from packaging +# https://github.com/gchamon/sysrsync/pull/39 +Patch: %{url}/pull/39.patch + +BuildArch: noarch + +BuildRequires: rsync + +BuildRequires: python3-devel + +%global common_description %{expand: +%{summary}.} + +%description %{common_description} + + +%package -n python3-sysrsync +Summary: %{summary} + +Requires: rsync + +%description -n python3-sysrsync %{common_description} + + +%prep +%autosetup -n sysrsync-%{version} -p1 + + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files sysrsync +# Upstream has a weird mixture of setup.py and pyproject.toml configuration. + + +%check +# We cannot run the end-to-end-tests/ because they require Docker and network +# access, but we can run the unit tests. +%{py3_test_envvars} %{python3} -m unittest discover -v -s test/ + + +%files -n python3-sysrsync -f %{pyproject_files} +%license LICENSE +%doc README.md + + +%changelog +%autochangelog @@ -0,0 +1 @@ +ffeb73874825388bcceadde1e8107639 sysrsync-1.1.1.tar.gz |