diff --git a/python-gitlab-1.0.2.tar.gz b/python-gitlab-1.0.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4a9106c08349ca968fd3cb84afe83ffeec63f296 Binary files /dev/null and b/python-gitlab-1.0.2.tar.gz differ diff --git a/python-gitlab-6.3.0.tar.gz b/python-gitlab-6.3.0.tar.gz deleted file mode 100644 index cf27e0ad644252cf99786bc9afd58a27419b1c05..0000000000000000000000000000000000000000 Binary files a/python-gitlab-6.3.0.tar.gz and /dev/null differ diff --git a/python-gitlab.spec b/python-gitlab.spec index 41fd1c5ca46aac85530caa760ceaad6b761651bd..c428371e0fdb4dcc401ba5721dadf66b7be24d53 100644 --- a/python-gitlab.spec +++ b/python-gitlab.spec @@ -1,23 +1,27 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-gitlab -Version: 6.3.0 +Version: 1.0.2 Release: 1 Summary: Interact with GitLab API License: LGPL-3.0-only URL: https://github.com/python-gitlab/python-gitlab -Source0: %{pypi_source python-gitlab} +Source0: https://files.pythonhosted.org/packages/source/p/python-gitlab/python-gitlab-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-wheel +BuildRequires: python3-pip + %description ``python-gitlab`` is a Python package providing access to the GitLab server API. It supports the v4 API of GitLab, and provides a CLI tool (``gitlab``). %package -n python3-gitlab Summary: Interact with GitLab API -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-wheel -BuildRequires: python3-pip Requires: python3-requests Requires: python3-requests-toolbelt Provides: python-python-gitlab = %{version}-%{release} @@ -37,13 +41,31 @@ It supports the v4 API of GitLab, and provides a CLI tool (``gitlab``). %prep %autosetup -n python-gitlab-%{version} +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + # Relax some dependencies sed -i 's/requests>=2.32.0/requests/' pyproject.toml %build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_build %install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -62,6 +84,9 @@ if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 1.0.2-1 +- Update package to version 1.0.2 + * Tue Sep 09 2025 lilu - 6.3.0-1 - Update package to version 6.3.0 * Add sync method to force remote mirror updates