pgdg-python3-dateutil: Initial packaging for the PostgreSQL RPM repository to support...
authorDevrim Gunduz <devrim@gunduz.org>
Sun, 18 May 2025 11:01:44 +0000 (14:01 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Sun, 18 May 2025 11:01:44 +0000 (14:01 +0300)
12 files changed:
rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/pgdg-python3-dateutil.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/relax-setuptools_scm-requires.patch [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/pgdg-python3-dateutil.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/relax-setuptools_scm-requires.patch [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/pgdg-python3-dateutil.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/relax-setuptools_scm-requires.patch [new symlink]
rpm/redhat/main/common/pgdg-python3-dateutil/main/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-dateutil/main/pgdg-python3-dateutil.spec [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-dateutil/main/relax-setuptools_scm-requires.patch [new file with mode: 0644]

diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/Makefile b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/Makefile
new file mode 100644 (file)
index 0000000..2c0af0d
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel8
+SPECFILE="pgdg-python3-dateutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/pgdg-python3-dateutil.spec b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/pgdg-python3-dateutil.spec
new file mode 120000 (symlink)
index 0000000..7d860d9
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-dateutil.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/relax-setuptools_scm-requires.patch b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-8/relax-setuptools_scm-requires.patch
new file mode 120000 (symlink)
index 0000000..dda1cc4
--- /dev/null
@@ -0,0 +1 @@
+../main/relax-setuptools_scm-requires.patch
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/Makefile b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/Makefile
new file mode 100644 (file)
index 0000000..6926656
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel9
+SPECFILE="pgdg-python3-dateutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/pgdg-python3-dateutil.spec b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/pgdg-python3-dateutil.spec
new file mode 120000 (symlink)
index 0000000..7d860d9
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-dateutil.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/relax-setuptools_scm-requires.patch b/rpm/redhat/main/common/pgdg-python3-dateutil/EL-9/relax-setuptools_scm-requires.patch
new file mode 120000 (symlink)
index 0000000..dda1cc4
--- /dev/null
@@ -0,0 +1 @@
+../main/relax-setuptools_scm-requires.patch
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/Makefile b/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/Makefile
new file mode 100644 (file)
index 0000000..ae7a414
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=".sles15"
+SPECFILE="pgdg-python3-dateutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/pgdg-python3-dateutil.spec b/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/pgdg-python3-dateutil.spec
new file mode 120000 (symlink)
index 0000000..7d860d9
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-dateutil.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/relax-setuptools_scm-requires.patch b/rpm/redhat/main/common/pgdg-python3-dateutil/SLES-12/relax-setuptools_scm-requires.patch
new file mode 120000 (symlink)
index 0000000..dda1cc4
--- /dev/null
@@ -0,0 +1 @@
+../main/relax-setuptools_scm-requires.patch
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/main/Makefile b/rpm/redhat/main/common/pgdg-python3-dateutil/main/Makefile
new file mode 100644 (file)
index 0000000..643566c
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f99
+SPECFILE="pgdg-python3-dateutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/main/pgdg-python3-dateutil.spec b/rpm/redhat/main/common/pgdg-python3-dateutil/main/pgdg-python3-dateutil.spec
new file mode 100644 (file)
index 0000000..0f106d3
--- /dev/null
@@ -0,0 +1,63 @@
+%global modname dateutil
+
+%if 0%{?fedora} <= 42
+%global __ospython %{_bindir}/python3.13
+%endif
+%if 0%{?suse_version} >= 1500
+%global __ospython %{_bindir}/python3.12
+%endif
+%if 0%{?rhel} && 0%{?rhel} < 10
+%global __ospython %{_bindir}/python3.12
+%endif
+
+%{expand: %%global pybasever %(echo `%{__ospython} -c "import sys; sys.stdout.write(sys.version[:4])"`)}
+%global pgdg_python3_sitearch %(%{__ospython} -Esc "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '%{_prefix}'}))")
+
+Name:          pgdg-python-%{modname}
+Version:       2.9.0.post0
+Release:       1PGDG%{?dist}
+Summary:       Powerful extensions to the standard datetime module
+License:       (Apache-2.0 AND BSD-3-Clause) OR BSD-3-Clause
+URL:           https://github.com/%{modname}/%{modname}
+Source:                %{pypi_source python-dateutil}
+# Allow setuptools-scm dependency greater than v8.0
+Patch:         relax-setuptools_scm-requires.patch
+
+BuildArch:     noarch
+BuildRequires: python3-devel
+Requires:      tzdata
+
+%description
+The dateutil module provides powerful extensions to the standard datetime\
+module available in Python.
+
+%prep
+%autosetup -p1 -n python-%{modname}-%{version}
+iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
+%{__mv} NEWS.new NEWS
+
+%build
+%{__ospython} setup.py build
+
+%install
+%{__ospython} setup.py install --no-compile --root %{buildroot}
+
+
+%files
+%doc NEWS README.rst
+%license LICENSE
+%{pgdg_python3_sitearch}/%{modname}/*.py*
+%{pgdg_python3_sitearch}/%{modname}/__pycache__/*.py*
+%{pgdg_python3_sitearch}/%{modname}/parser/*.py*
+%{pgdg_python3_sitearch}/%{modname}/parser/__pycache__/*.py*
+%{pgdg_python3_sitearch}/%{modname}/tz/*.py*
+%{pgdg_python3_sitearch}/%{modname}/tz/__pycache__/*.py*
+%{pgdg_python3_sitearch}/%{modname}/zoneinfo/__pycache__/*.py*
+%{pgdg_python3_sitearch}/%{modname}/zoneinfo/*.py*
+%{pgdg_python3_sitearch}/%{modname}/zoneinfo/%{modname}-zoneinfo.tar.gz
+%{pgdg_python3_sitearch}/python_dateutil-%{version}-py%{pybasever}.egg-info/*
+
+%changelog
+* Sun May 18 2025 Devrim Gunduz <devrim@gunduz.org> - 2.9.0.post0-1PGDG
+- Inıtial packaging for the PostgreSQL RPM repository to support Barman
+  on RHEL 8, RHEL 9 and SLES 15.
diff --git a/rpm/redhat/main/common/pgdg-python3-dateutil/main/relax-setuptools_scm-requires.patch b/rpm/redhat/main/common/pgdg-python3-dateutil/main/relax-setuptools_scm-requires.patch
new file mode 100644 (file)
index 0000000..4547a36
--- /dev/null
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN a/pyproject.toml b/pyproject.toml
+--- a/pyproject.toml   2024-03-01 19:35:19.000000000 +0100
++++ b/pyproject.toml   2025-05-08 17:56:27.011526557 +0200
+@@ -3,7 +3,7 @@
+     "setuptools; python_version != '3.3'",
+     "setuptools<40.0; python_version == '3.3'",
+     "wheel",
+-    "setuptools_scm<8.0"
++    "setuptools_scm"
+ ]
+ build-backend = "setuptools.build_meta"