python-pygit2/python-pygit2.spec

84 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pygit2
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-pygit2
- Update to 1.15.1 * Many deprecated features have been removed, see below * Upgrade to libgit2 v1.8.1 * New `push_options` optional argument in `Repository.push(...)` * New support comparison of `Oid` with text string * Fix `CheckoutNotify.IGNORED` * Use default error handler when decoding/encoding paths * Remove setuptools runtime dependency * Coding style with ruff * Add wheels for ppc64le * Fix tests on EPEL8 builds for s390x * Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)` * Remove deprecated `oid.hex`, use `str(oid)` * Remove deprecated `object.hex`, use `str(object.id)` * Remove deprecated `object.oid`, use `object.id` * Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)` * Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]` * Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)` * Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)` * Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType` * Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag` * Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType` * Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT` * Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL` * Remove deprecated support for passing dicts to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and `MergeFileFlag` for `file_flags`. * Remove deprecated support for passing a string for the favor argument to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`. - Drop patches for issues fixed upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=93
2024-06-19 13:29:50 +02:00
Version: 1.15.0
Release: 0
Summary: Python bindings for libgit2
License: GPL-2.0-only
URL: https://github.com/libgit2/pygit2
Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz
BuildRequires: %{python_module cached-property}
- Update to 1.15.1 * Many deprecated features have been removed, see below * Upgrade to libgit2 v1.8.1 * New `push_options` optional argument in `Repository.push(...)` * New support comparison of `Oid` with text string * Fix `CheckoutNotify.IGNORED` * Use default error handler when decoding/encoding paths * Remove setuptools runtime dependency * Coding style with ruff * Add wheels for ppc64le * Fix tests on EPEL8 builds for s390x * Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)` * Remove deprecated `oid.hex`, use `str(oid)` * Remove deprecated `object.hex`, use `str(object.id)` * Remove deprecated `object.oid`, use `object.id` * Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)` * Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]` * Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)` * Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)` * Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType` * Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag` * Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType` * Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT` * Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL` * Remove deprecated support for passing dicts to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and `MergeFileFlag` for `file_flags`. * Remove deprecated support for passing a string for the favor argument to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`. - Drop patches for issues fixed upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=93
2024-06-19 13:29:50 +02:00
BuildRequires: %{python_module cffi >= 1.16.0}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: ca-certificates
BuildRequires: ca-certificates-mozilla
BuildRequires: fdupes
BuildRequires: libgit2-devel >= 1.1
BuildRequires: libopenssl-devel
BuildRequires: python-rpm-macros
Requires: python-cached-property
%requires_eq python-cffi
%python_subpackages
%description
Bindings for libgit2, a linkable C library for the Git version-control system.
%prep
%autosetup -p1 -n pygit2-%{version}
%if %{?pkg_vcmp:%pkg_vcmp libgit2-devel < 1.8}%{!?pkg_vcmp:1}
%patch -P 3 -p1 -R
%patch -P 2 -p1 -R
%patch -P 1 -p1 -R
%patch -P 0 -p1 -R
%endif
Accepting request 926494 from home:mcepl:branches:devel:libraries:c_c++ - Update to 1.7.0: - Upgrade to libgit2 1.3.0 - Add support for Python 3.10 - Drop support for Python 3.6 - New `pygit2.GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES` - New optional argument ``location`` in ``Repository.applies(..)`` and ``Repository.apply(..)`` - Fix: Now the `flags` argument in `Repository.blame()` is passed through - CI: Stop using Travis, move to GitHub actions - Fix a number of reference leaks - Review custom object backends - In custom backends the callbacks have been renamed from ``read`` to ``read_cb``, ``write`` to ``write_cb``, and so on. - New optional ``proxy`` argument in ``Remote`` methods - New GIT_MERGE_PREFERENCE constants - Don't require cached-property with Python 3.8 or later - Refactored build and CI, new ``build.sh`` script - Remove deprecated ``GIT_CREDTYPE_XXX`` contants, use ``GIT_CREDENTIAL_XXX`` instead. - Remove deprecated ``Patch.patch`` getter, use ``Patch.text`` instead. - New ``PackBuilder`` class and ``Repository.pack(...)`` - New ``Config.delete_multivar(...)`` - New ``Repository.is_shallow`` - New optional ``message`` argument in ``Repository.create_reference(...)`` - Fix truncated diff when there are nulls - Fix ``Index.add(...)`` raise ``TypeError`` instead of ``AttributeError`` when arguments are of unexpected type - Upgrade to libgit2 1.1, new ``GIT_BLAME_IGNORE_WHITESPACE`` constant - Drop support for PyPy3 7.2 - New optional ``flags`` argument in ``Repository.__init__(...)``, new ``GIT_REPOSITORY_OPEN_*`` constants - Remove upstreamed libgit2_1.patch. OBS-URL: https://build.opensuse.org/request/show/926494 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=63
2021-10-20 11:10:02 +02:00
# do not add options to pytest
rm pytest.ini
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%install
%pyproject_install
%python_expand rm -rf %{buildroot}%{$python_sitearch}/pygit2/decl/
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
rm -rf pygit2
# test_no_context_lines failing on big endian
# https://github.com/libgit2/pygit2/issues/812
- Update to 1.15.1 * Many deprecated features have been removed, see below * Upgrade to libgit2 v1.8.1 * New `push_options` optional argument in `Repository.push(...)` * New support comparison of `Oid` with text string * Fix `CheckoutNotify.IGNORED` * Use default error handler when decoding/encoding paths * Remove setuptools runtime dependency * Coding style with ruff * Add wheels for ppc64le * Fix tests on EPEL8 builds for s390x * Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)` * Remove deprecated `oid.hex`, use `str(oid)` * Remove deprecated `object.hex`, use `str(object.id)` * Remove deprecated `object.oid`, use `object.id` * Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)` * Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]` * Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)` * Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)` * Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType` * Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag` * Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType` * Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT` * Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL` * Remove deprecated support for passing dicts to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and `MergeFileFlag` for `file_flags`. * Remove deprecated support for passing a string for the favor argument to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`. - Drop patches for issues fixed upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygit2?expand=0&rev=93
2024-06-19 13:29:50 +02:00
donttest="test_no_context_lines"
donttest="$donttest or test_push_options"
%pytest_arch -k "not ($donttest)"
%files %{python_files}
%license COPYING
%doc README.md
%{python_sitearch}/pygit2
%{python_sitearch}/pygit2-%{version}.dist-info
%changelog