Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mass rebuild packages with Python 3.11 #746

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
030819f
Change from python 3.9 to python 3.11
Odilhao Nov 11, 2023
333f37d
Mass Rebuild with Python 3.11
Odilhao Nov 11, 2023
a2b2162
Update python-setuptools-scm to 7.1.0
Odilhao Nov 11, 2023
8c2d4ad
Update python-setuptools-rust to 1.6.0
Odilhao Nov 11, 2023
8ff9d2e
Update python-setuptools_scm_git_archive to 1.4.1
Odilhao Nov 11, 2023
0504871
Update python-pluggy to 1.3.0
Odilhao Nov 11, 2023
8cfe06e
Update ansible-lint to 5.4.0
Odilhao Nov 11, 2023
5b291ed
Remove egg from libcomps
Odilhao Nov 11, 2023
c660131
Fix python 3.11 bindings for libsolv
Odilhao Nov 11, 2023
e3eee84
Add pyproject-rpm-macros for python-anyio build
Odilhao Nov 11, 2023
3291a1d
Add typing-extensions to python-dateutil build
Odilhao Nov 11, 2023
8ac173e
Add typing-extensios for python-enrich build
Odilhao Nov 12, 2023
c0939ce
Add typing-extensions to python-tenacity
Odilhao Nov 12, 2023
cfa0acb
Add pyproject-rpm-macros for python-keyring build
Odilhao Nov 12, 2023
dc78449
Add pyproject-rpm-macros for python-tablib build
Odilhao Nov 12, 2023
5af61a6
Add typing-extensions to python-zip
Odilhao Nov 13, 2023
c1647a3
Update Package Manifest for Python 3.11 Rebuild
Odilhao Nov 13, 2023
5d95481
Remove python-cchardet from aiohttp, it's not required with python 3.11
Odilhao Nov 13, 2023
94672d3
Update comps for Python 3.11
Odilhao Nov 13, 2023
1af8e66
Add version to createrepo_c changelog
Odilhao Nov 13, 2023
f3e639f
Remove python-chardet
Odilhao Nov 13, 2023
6996641
Remove django-automated-logging
Odilhao Nov 13, 2023
3052196
Remove python-django-current-user
Odilhao Nov 13, 2023
8e298f8
Update -DPYTHON_EXECUTABLE variable on createrepo_c to %{__python3}
Odilhao Nov 13, 2023
5a9f5c6
Add patch on python-certifi to use the system cert
Odilhao Nov 13, 2023
240f0b8
Drop modules from Pulpcore packaging
Odilhao Nov 13, 2023
e039215
Change -DPYTHON_EXECUTABLE on libsolv to %{__python3}
Odilhao Nov 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
534 changes: 267 additions & 267 deletions comps/comps-pulpcore-el8.xml

Large diffs are not rendered by default.

538 changes: 269 additions & 269 deletions comps/comps-pulpcore-el9.xml

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions modulemd/modulemd-pulpcore-el8.yaml

This file was deleted.

12 changes: 8 additions & 4 deletions package_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ packages:
copr_projects:
vars:
core_modules:
- 'python39:3.9'
- 'ruby:2.7'
rhel_9: '9'
rhel_8: '8'
Expand All @@ -58,14 +57,20 @@ copr_projects:
comps_file: "{{ inventory_dir }}/comps/comps-pulpcore-el{{ rhel_9 }}.xml"
buildroot_packages:
- gcc-c++
- python3.11-rpm-macros
- python3.11
- python3.11-devel
- python3.11-pip
external_repos:
- "{{ pulpcore_staging }}/rhel-{{ rhel_9 }}-x86_64"
- name: "rhel-{{ rhel_8 }}-x86_64"
modules: "{{ core_modules }}"
comps_file: "{{ inventory_dir }}/comps/comps-pulpcore-el{{ rhel_8 }}.xml"
buildroot_packages:
- gcc-c++
- python39-rpm-macros
- python3.11-rpm-macros
- python3.11
- python3.11-pip
external_repos:
- "{{ pulpcore_staging }}/rhel-{{ rhel_8 }}-x86_64"

Expand Down Expand Up @@ -129,6 +134,7 @@ tier2_packages:
python-flit-core: {}
python-poetry_core: {}
python-semantic-version: {}
python-typing-extensions: {}
python-setuptools-rust: {}
python-setuptools_scm_git_archive: {}

Expand Down Expand Up @@ -195,7 +201,6 @@ tier4_packages:
python-brotli: {}
python-build: {}
python-cachecontrol: {}
python-cchardet: {}
python-certifi: {}
python-cffi: {}
python-chardet: {}
Expand Down Expand Up @@ -366,7 +371,6 @@ tier4_packages:
python-tomlkit: {}
python-toml: {}
python-types-cryptography: {}
python-typing-extensions: {}
python-uritemplate: {}
python-url-normalize: {}
python-urllib3: {}
Expand Down
1 change: 0 additions & 1 deletion packages/ansible-lint/ansible-lint-5.0.8.tar.gz

This file was deleted.

1 change: 1 addition & 0 deletions packages/ansible-lint/ansible-lint-5.4.0.tar.gz
31 changes: 21 additions & 10 deletions packages/ansible-lint/ansible-lint.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
%{?python_disable_dependency_generator}
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
# Created by pyp2rpm-3.3.3
%global pypi_name ansible-lint

Name: %{pypi_name}
Version: 5.0.8
Release: 4%{?dist}
Version: 5.4.0
Release: 1%{?dist}
Summary: Checks playbooks for practices and behaviour that could potentially be improved

License: MIT
Expand All @@ -13,8 +16,9 @@ BuildArch: noarch

BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-setuptools-scm >= 3.5.0
BuildRequires: python%{python3_pkgversion}-setuptools-scm >= 7.0.5
BuildRequires: python%{python3_pkgversion}-setuptools_scm_git_archive
BuildRequires: pyproject-rpm-macros

%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
# This should be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can now support rich dependencies so you can update it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would be the best to change this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the suggestion is in the file itself. @evgeni any thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproject-rpm-macros is a project we build for EL8, it's present on EL9 by default, but we need this for PEP-517, we build this internally

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not talking about the BuildRequires, but about the comment (and the lines that follow).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok, we would need to work in all packages, because we use the same line for all packages.

Expand All @@ -36,24 +40,31 @@ Requires: python%{python3_pkgversion}-wcmatch >= 7.0
%{summary}

%prep
set -ex
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info


%build
%py3_build
set -ex
%pyproject_wheel


%install
%py3_install
set -ex
%pyproject_install

%files
%license LICENSE
%doc README.rst docs/README.md examples/playbooks/README.md test/local-content/README.md
%{_bindir}/ansible-lint
%{python3_sitelib}/ansiblelint
%{python3_sitelib}/ansible_lint-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/ansible_lint-%{version}.dist-info/

%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 5.4.0-1
- Release ansible-lint 5.4.0

* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 5.0.8-5
- Build against python 3.11

* Thu Apr 28 2022 Odilon Sousa <osousa@redhat.com> - 5.0.8-4
- Rebuilding against python 3.9

Expand Down
13 changes: 9 additions & 4 deletions packages/createrepo_c/createrepo_c.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11

%global libmodulemd_version 2.3.0

%define __cmake_in_source_build 1
Expand All @@ -11,7 +14,7 @@
%endif

# Our EL8 buildroots default to Python 3.9, but let's also build 3.6, just to be safe
%if 0%{?rhel} == 8 && 0%{python3_pkgversion} != 03
%if 0%{?rhel} == 8
%bcond_without python36
%else
%bcond_with python36
Expand Down Expand Up @@ -43,7 +46,7 @@
Summary: Creates a common metadata repository
Name: createrepo_c
Version: 1.0.2
Release: 2%{?dist}
Release: 3%{?dist}
License: GPL-2.0-or-later
URL: https://github.com/rpm-software-management/createrepo_c
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Expand Down Expand Up @@ -166,7 +169,7 @@ pushd build-py3
-DWITH_LEGACY_HASHES=%{?with_legacy_hashes:ON}%{!?with_legacy_hashes:OFF} \
-DWITH_ZSTD=%{?with_zstd:ON}%{!?with_zstd:OFF} \
-DENABLE_DRPM=%{?with_drpm:ON}%{!?with_drpm:OFF} \
-DPYTHON_EXECUTABLE=/usr/bin/python3.9 -DPYTHON_LIBRARY=/usr/lib64/libpython3.9.so
-DPYTHON_EXECUTABLE=%{__python3} -DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so
make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}"
# Build C documentation
make doc-c
Expand Down Expand Up @@ -254,7 +257,6 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo

%files -n python%{python3_pkgversion}-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info

%if %{with python36}
%files -n python3-%{name}
Expand All @@ -263,6 +265,9 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
%endif

%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 1.0.3-2
- Build against python 3.11

* Mon Nov 06 2023 Odilon Sousa <osousa@redhat.com> - 1.0.2-2
- Build python3.6 using python3 naming for EL8

Expand Down
9 changes: 7 additions & 2 deletions packages/libcomps/libcomps.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11

# explicitly define, as we build on top of an scl, not inside with scl_package
%if 0%{?scl:1}
%global scl_prefix %{scl}-
Expand Down Expand Up @@ -25,7 +28,7 @@

Name: libcomps
Version: 0.1.18
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Comps XML file manipulation library

License: GPLv2+
Expand Down Expand Up @@ -230,7 +233,6 @@ popd
%if %{with python3}
%files -n %{?scl_prefix}python%{python3_pkgversion}-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%endif

%if %{with python36}
Expand All @@ -240,6 +242,9 @@ popd
%endif

%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 0.1.18-5
- Build against python 3.11

* Thu May 12 2022 Yanis Guenane <yguenane@redhat.com> - 0.1.18-4
- Fix obsolete named package

Expand Down
18 changes: 15 additions & 3 deletions packages/libsolv/libsolv.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11

# explicitly define, as we build on top of an scl, not inside with scl_package
%if 0%{?scl:1}
%global scl_prefix %{scl}-
Expand Down Expand Up @@ -46,7 +49,7 @@

Name: lib%{libname}
Version: 0.7.22
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Package dependency solver

License: BSD
Expand Down Expand Up @@ -232,10 +235,16 @@ set -ex
-DPYTHON_EXECUTABLE=%{__python2} \
%if %{with python3_bindings}
-DENABLE_PYTHON3=ON \
-DPYTHON3_EXECUTABLE=%{__python3} \
-DPYTHON_EXECUTABLE=%{__python3} \
-DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so.1.0 \
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
-DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
-DPython_ADDITIONAL_VERSIONS=3.11 \
%endif
%else
-DPYTHON_EXECUTABLE=%{__python3} \
-DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so.1.0 \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \
-DPython_ADDITIONAL_VERSIONS=3.11 \
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
%endif
%endif
%{nil}
Expand Down Expand Up @@ -376,7 +385,7 @@ set -ex
%files -n %{?scl_prefix}python%{python3_pkgversion}-%{libname}
%{python3_sitearch}/_%{libname}.so
%{python3_sitearch}/%{libname}.py
%if 0%{?!scl:1}
Odilhao marked this conversation as resolved.
Show resolved Hide resolved
%if 0%{?rhel} == 9
%{python3_sitearch}/__pycache__/%{libname}.*
%endif
%endif
Expand All @@ -389,6 +398,9 @@ set -ex
%endif

%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 0.7.22-5
- Build against python 3.11

* Thu May 12 2022 Yanis Guenane <yguenane@redhat.com> - 0.7.22-4
- Fix obsolete named package

Expand Down
8 changes: 7 additions & 1 deletion packages/pyproject-rpm-macros/pyproject-rpm-macros.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11

Name: pyproject-rpm-macros
Summary: RPM macros for PEP 517 Python packages
License: MIT
Expand All @@ -9,7 +12,7 @@ License: MIT
# Increment Z when this is a bugfix or a cosmetic change
# Dropping support for EOL Fedoras is *not* considered a breaking change
Version: 1.9.0
Release: 2%{?dist}
Release: 3%{?dist}

# Macro files
Source001: macros.pyproject
Expand Down Expand Up @@ -128,6 +131,9 @@ test "$signature1" != ""


%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 1.9.0-3
- Build against python 3.11

* Fri Oct 13 2023 Odilon Sousa <osousa@redhat.com> - 1.9.0-2
- Add pip as requirements

Expand Down
7 changes: 6 additions & 1 deletion packages/python-aiodns/python-aiodns.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11
%{?scl:%scl_package python-%{pypi_name}}
%{!?scl:%global pkg_name %{name}}

Expand All @@ -6,7 +8,7 @@

Name: %{?scl_prefix}python-%{pypi_name}
Version: 3.0.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Simple DNS resolver for asyncio

License: MIT
Expand Down Expand Up @@ -63,6 +65,9 @@ set -ex


%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 3.0.0-4
- Build against python 3.11

* Fri Apr 22 2022 Yanis Guenane <yguenane@redhat.com> - 3.0.0-3
- Build against python 3.9

Expand Down
7 changes: 6 additions & 1 deletion packages/python-aiofiles/python-aiofiles.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11
%{?scl:%scl_package python-%{pypi_name}}
%{!?scl:%global pkg_name %{name}}

Expand All @@ -6,7 +8,7 @@

Name: %{?scl_prefix}python-%{pypi_name}
Version: 22.1.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: File support for asyncio

License: Apache 2.0
Expand Down Expand Up @@ -62,6 +64,9 @@ set -ex


%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 22.1.0-2
- Build against python 3.11

* Tue Sep 20 2022 Odilon Sousa 22.1.0-1
- Update to 22.1.0

Expand Down
7 changes: 6 additions & 1 deletion packages/python-aiohttp-socks/python-aiohttp-socks.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%global python3_pkgversion 3.11
%global __python3 /usr/bin/python3.11
%{?scl:%scl_package python-%{pypi_name}}
%{!?scl:%global pkg_name %{name}}
%{?python_disable_dependency_generator}
Expand All @@ -7,7 +9,7 @@

Name: %{?scl_prefix}python-%{pypi_name}
Version: 0.7.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Proxy connector for aiohttp

License: Apache 2
Expand Down Expand Up @@ -67,6 +69,9 @@ set -ex


%changelog
* Sat Nov 11 2023 Odilon Sousa <osousa@redhat.com> - 0.7.1-4
- Build against python 3.11

* Fri May 06 2022 Odilon Sousa <osousa@redhat.com> - 0.7.1-3
- Rebuilding with python_disable_dependency_generator macro

Expand Down