forked from pool/python-patch-ng
Accepting request 1120779 from home:badshah400
This is patch-ng — a Python module for parsing and applying unified diffs. It is needed by Conan, a C/C++ package manager, that I have packaged and will submit to Factory once patch-ng has made its way there. Thanks. OBS-URL: https://build.opensuse.org/request/show/1120779 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-patch-ng?expand=0&rev=1
This commit is contained in:
59
python-patch-ng.spec
Normal file
59
python-patch-ng.spec
Normal file
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# spec file for package python-patch-ng
|
||||
#
|
||||
# Copyright (c) 2023 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-patch-ng
|
||||
Version: 1.17.4
|
||||
Release: 0
|
||||
Summary: Library to parse and apply unified diffs
|
||||
License: MIT
|
||||
URL: https://github.com/conan-io/python-patch
|
||||
# PyPI sources do not include tests
|
||||
Source: https://github.com/conan-io/python-patch-ng/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Patch-ng is a Python library to parse and apply unified diffs.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%{python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
sed -Ei "1{\@/usr/bin/env python@d}" %{buildroot}%{$python_sitelib}/patch_ng.py
|
||||
}
|
||||
|
||||
%check
|
||||
%python_exec tests/run_tests.py
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%{python_sitelib}/patch_ng.py
|
||||
%{python_sitelib}/patch_ng-%{version}.dist-info
|
||||
%pycache_only %{python_sitelib}/__pycache__
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user