From 0c32f48b70db8483f5f1b06f9c5d93ef7853d4e8 Mon Sep 17 00:00:00 2001 From: Joel Capitao Date: Nov 06 2024 14:49:50 +0000 Subject: Import python-setproctitle-1.3.3-1.el10s in CloudSIG Epoxy --- diff --git a/.python-setproctitle.metadata b/.python-setproctitle.metadata index fb846c3..10e84b7 100644 --- a/.python-setproctitle.metadata +++ b/.python-setproctitle.metadata @@ -1 +1 @@ -b956afb826aa4155542a3a7e881ae56ab0f29466 SOURCES/setproctitle-1.1.6.tar.gz +faaf7f287b0b9c4c8a9bb92f83a94d48d6d63837 SOURCES/py-setproctitle-version-1.3.3.tar.gz diff --git a/SOURCES/.gitkeep b/SOURCES/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitkeep diff --git a/SPECS/python-setproctitle.spec b/SPECS/python-setproctitle.spec index 14b5db2..2741dca 100644 --- a/SPECS/python-setproctitle.spec +++ b/SPECS/python-setproctitle.spec @@ -1,51 +1,40 @@ -%if 0%{?fedora} > 12 -%global with_python3 1 -%else -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif - - -%global tarname setproctitle - -Name: python-setproctitle -Version: 1.1.6 -Release: 5%{?dist} +%global pypi_name setproctitle +%global forgeurl https://github.com/dvarrazzo/py-setproctitle + +Name: python-%{pypi_name} +Version: 1.3.3 +%global tag version-%{version} +%forgemeta +Release: %{autorelease} Summary: Python module to customize a process title -License: BSD -URL: http://pypi.python.org/pypi/%{tarname} -Source0: http://pypi.python.org/packages/source/s/%{tarname}/%{tarname}-%{version}.tar.gz +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD +URL: %{forgeurl} +Source0: %{forgesource} -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-nose -BuildRequires: python-tools -%{?filter_setup: -%filter_provides_in %{python_sitearch}/.*\.so$ -%filter_setup -} +BuildRequires: gcc +BuildRequires: python3-devel +# Tests +BuildRequires: procps-ng -%description +%global _description %{expand: Python module allowing a process to change its title as displayed by system tool such as ps and top. It's useful in multiprocess systems, allowing to identify tasks each forked process is busy with. This technique has been used by PostgreSQL and OpenSSH. -It's based on PostgreSQL implementation which has proven to be portable. +It is based on PostgreSQL implementation which has proven to be portable.} +%description %_description -%if 0%{?with_python3} -%package -n python3-%{tarname} -Summary: Python module to customize a process title -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-nose +%package -n python3-%{pypi_name} +Summary: %{summary} -%description -n python3-%{tarname} +%description -n python3-%{pypi_name} Python module allowing a process to change its title as displayed by system tool such as ps and top. @@ -53,84 +42,34 @@ It's useful in multi-process systems, allowing to identify tasks each forked process is busy with. This technique has been used by PostgreSQL and OpenSSH. It's based on PostgreSQL implementation which has proven to be portable. -%endif - -%prep -%setup -q -n %{tarname}-%{version} -%{?with_python3: cp -a . %{py3dir}} -%build -# Remove CFLAGS=... for noarch packages (unneeded) -CFLAGS="%{optflags}" %{__python} setup.py build -%if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="%{optflags}" %{__python3} setup.py build -popd -%endif +%prep +%forgesetup +# This string which is not used appears causes a crash of tox in fedora builds. +sed -i 's/pypy-3.8//' tox.ini -%install -%{__python} setup.py install -O1 --skip-build --root %{buildroot} -chmod 0755 %{buildroot}%{python_sitearch}/setproctitle.so -%if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="%{optflags}" %{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd -chmod 0755 %{buildroot}%{python3_sitearch}/setproctitle*.so -%endif +%generate_buildrequires +%pyproject_buildrequires -t -%check -make tests/pyrun2 -# FIXME: tests are broken with python3 -%if 0%{?with_python3} -pushd %{py3dir} -BUILD_DIR=$(%{__python3} -c "import sys; import platform; \ -print('build/lib.linux-{0}-{1}.{2}'.format(platform.machine(), \ -sys.version_info[0], sys.version_info[1]))") -# looks like tests are not 2to3'ed by setup.py -2to3 -w --no-diffs tests -gcc `pkg-config --cflags --libs python3` -o tests/pyrun3 tests/pyrun.c -PYTHONPATH=$BUILD_DIR:$PYTHONPATH ROOT_PATH=$(pwd) \ - %{__python3} tests/setproctitle_test.py -v || : -popd -%endif - - -%files -%doc README.rst COPYRIGHT -# For arch-specific packages: sitearch -%{python_sitearch}/* - -%if 0%{?with_python3} -%files -n python3-%{tarname} -%doc README.rst COPYRIGHT -# For arch-specific packages: sitearch -%{python3_sitearch}/* -%endif -%changelog -* Fri Jan 24 2014 Daniel Mach - 1.1.6-5 -- Mass rebuild 2014-01-24 +%build +%pyproject_wheel -* Fri Dec 27 2013 Daniel Mach - 1.1.6-4 -- Mass rebuild 2013-12-27 -* Wed Aug 7 2013 Andy Grover - 1.1.6-3 -- Remove with_python3 if rhel > 6 +%install +%pyproject_install +%pyproject_save_files %{pypi_name} -* Thu Feb 14 2013 Fedora Release Engineering - 1.1.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild -* Sat Aug 4 2012 Haïkel Guémar - 1.1.6-1 -- upstream 1.1.6 +%check +%tox -* Sat Jul 21 2012 Fedora Release Engineering - 1.1.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild -* Mon Mar 05 2012 Haïkel Guémar - 1.1.3-2 -- enable tests execution -- spec cleaning +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc README.rst +%license COPYRIGHT -* Sun Jan 29 2012 Haïkel Guémar - 1.1.3-1 -- initial packaging +%changelog +%autochangelog