Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions SPECS/python3/python3.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Summary: A high-level scripting language
Name: python3
Version: 3.9.10
Release: 1%{?dist}
Release: 2%{?dist}
License: PSF
Vendor: Microsoft Corporation
Distribution: Mariner
Expand All @@ -27,13 +27,14 @@ BuildRequires: sqlite-devel
BuildRequires: xz-devel
Requires: ncurses
Requires: openssl
# The base package and the unversioned python command package are co-requirements.
Requires: python-unversioned-command = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: readline
Requires: xz
Provides: python
Provides: python-sqlite
Provides: python(abi)
Provides: %{_bindir}/python
Provides: /bin/python
Provides: /bin/python3
Provides: %{name}-docs = %{version}-%{release}
Expand Down Expand Up @@ -131,6 +132,13 @@ Requires: %{name} = %{version}-%{release}
%description test
The test package contains all regression tests for Python as well as the modules test.support and test.regrtest. test.support is used to enhance your tests while test.regrtest drives the testing suite.

%package -n python-unversioned-command
Summary: Unversioned python binary (points to %{name} binary)
Requires: %{name} = %{version}-%{release}

%description -n python-unversioned-command
Contains the unversioned python binary, which is a symlink to %{name}.

%prep
%autosetup -p1 -n Python-%{version}

Expand Down Expand Up @@ -186,6 +194,9 @@ popd
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/pathfix%{majmin}.py
ln -s ./pathfix%{majmin}.py %{buildroot}%{_bindir}/pathfix.py

# Create unversioned python binary file as a symlink
ln -s python3 %{buildroot}%{_bindir}/python

# Remove unused stuff
find %{buildroot}%{_libdir} -name '*.pyc' -delete
find %{buildroot}%{_libdir} -name '*.pyo' -delete
Expand Down Expand Up @@ -278,7 +289,13 @@ rm -rf %{buildroot}%{_bindir}/__pycache__
%files test
%{_libdir}/python%{majmin}/test/*

%files -n python-unversioned-command
%{_bindir}/python

%changelog
* Thu Mar 31 2022 Olivia Crain <[email protected]> - 3.9.10-2
- Add unversioned python binary to its own subpackage

* Tue Jan 25 2022 Thomas Crain <[email protected]> - 3.9.10-1
- Upgrade to latest bugfix release for the 3.9 series

Expand Down
9 changes: 5 additions & 4 deletions toolkit/resources/manifests/package/pkggen_core_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ ca-certificates-base-2.0.0-1.cm2.noarch.rpm
ca-certificates-2.0.0-1.cm2.noarch.rpm
dwz-0.14-1.cm2.aarch64.rpm
unzip-6.0-19.cm2.aarch64.rpm
python3-3.9.10-1.cm2.aarch64.rpm
python3-devel-3.9.10-1.cm2.aarch64.rpm
python3-libs-3.9.10-1.cm2.aarch64.rpm
python3-setuptools-3.9.10-1.cm2.noarch.rpm
python3-3.9.10-2.cm2.aarch64.rpm
python3-devel-3.9.10-2.cm2.aarch64.rpm
python3-libs-3.9.10-2.cm2.aarch64.rpm
python3-setuptools-3.9.10-2.cm2.noarch.rpm
python-unversioned-command-3.9.10-2.cm2.aarch64.rpm
which-2.21-8.cm2.aarch64.rpm
libselinux-3.2-1.cm2.aarch64.rpm
slang-2.3.2-4.cm2.aarch64.rpm
Expand Down
9 changes: 5 additions & 4 deletions toolkit/resources/manifests/package/pkggen_core_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ ca-certificates-base-2.0.0-1.cm2.noarch.rpm
ca-certificates-2.0.0-1.cm2.noarch.rpm
dwz-0.14-1.cm2.x86_64.rpm
unzip-6.0-19.cm2.x86_64.rpm
python3-3.9.10-1.cm2.x86_64.rpm
python3-devel-3.9.10-1.cm2.x86_64.rpm
python3-libs-3.9.10-1.cm2.x86_64.rpm
python3-setuptools-3.9.10-1.cm2.noarch.rpm
python3-3.9.10-2.cm2.x86_64.rpm
python3-devel-3.9.10-2.cm2.x86_64.rpm
python3-libs-3.9.10-2.cm2.x86_64.rpm
python3-setuptools-3.9.10-2.cm2.noarch.rpm
python-unversioned-command-3.9.10-2.cm2.x86_64.rpm
which-2.21-8.cm2.x86_64.rpm
libselinux-3.2-1.cm2.x86_64.rpm
slang-2.3.2-4.cm2.x86_64.rpm
Expand Down
19 changes: 10 additions & 9 deletions toolkit/resources/manifests/package/toolchain_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,25 +495,26 @@ procps-ng-devel-3.3.17-1.cm2.aarch64.rpm
procps-ng-lang-3.3.17-1.cm2.aarch64.rpm
pyproject-rpm-macros-1.0.0~rc1-2.cm2.noarch.rpm
python-markupsafe-debuginfo-2.1.0-1.cm2.aarch64.rpm
python3-3.9.10-1.cm2.aarch64.rpm
python-unversioned-command-3.9.10-2.cm2.aarch64.rpm
python3-3.9.10-2.cm2.aarch64.rpm
python3-audit-3.0.6-4.cm2.aarch64.rpm
python3-cracklib-2.9.7-4.cm2.aarch64.rpm
python3-curses-3.9.10-1.cm2.aarch64.rpm
python3-debuginfo-3.9.10-1.cm2.aarch64.rpm
python3-devel-3.9.10-1.cm2.aarch64.rpm
python3-curses-3.9.10-2.cm2.aarch64.rpm
python3-debuginfo-3.9.10-2.cm2.aarch64.rpm
python3-devel-3.9.10-2.cm2.aarch64.rpm
python3-gpg-1.16.0-1.cm2.aarch64.rpm
python3-jinja2-3.0.3-2.cm2.noarch.rpm
python3-libs-3.9.10-1.cm2.aarch64.rpm
python3-libs-3.9.10-2.cm2.aarch64.rpm
python3-libxml2-2.9.13-1.cm2.aarch64.rpm
python3-magic-5.40-2.cm2.noarch.rpm
python3-markupsafe-2.1.0-1.cm2.aarch64.rpm
python3-newt-0.52.21-3.cm2.aarch64.rpm
python3-pip-3.9.10-1.cm2.noarch.rpm
python3-pip-3.9.10-2.cm2.noarch.rpm
python3-pygments-2.4.2-7.cm2.noarch.rpm
python3-rpm-4.17.0-3.cm2.aarch64.rpm
python3-setuptools-3.9.10-1.cm2.noarch.rpm
python3-test-3.9.10-1.cm2.aarch64.rpm
python3-tools-3.9.10-1.cm2.aarch64.rpm
python3-setuptools-3.9.10-2.cm2.noarch.rpm
python3-test-3.9.10-2.cm2.aarch64.rpm
python3-tools-3.9.10-2.cm2.aarch64.rpm
readline-8.1-1.cm2.aarch64.rpm
readline-debuginfo-8.1-1.cm2.aarch64.rpm
readline-devel-8.1-1.cm2.aarch64.rpm
Expand Down
19 changes: 10 additions & 9 deletions toolkit/resources/manifests/package/toolchain_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,25 +495,26 @@ procps-ng-devel-3.3.17-1.cm2.x86_64.rpm
procps-ng-lang-3.3.17-1.cm2.x86_64.rpm
pyproject-rpm-macros-1.0.0~rc1-2.cm2.noarch.rpm
python-markupsafe-debuginfo-2.1.0-1.cm2.x86_64.rpm
python3-3.9.10-1.cm2.x86_64.rpm
python-unversioned-command-3.9.10-2.cm2.x86_64.rpm
python3-3.9.10-2.cm2.x86_64.rpm
python3-audit-3.0.6-4.cm2.x86_64.rpm
python3-cracklib-2.9.7-4.cm2.x86_64.rpm
python3-curses-3.9.10-1.cm2.x86_64.rpm
python3-debuginfo-3.9.10-1.cm2.x86_64.rpm
python3-devel-3.9.10-1.cm2.x86_64.rpm
python3-curses-3.9.10-2.cm2.x86_64.rpm
python3-debuginfo-3.9.10-2.cm2.x86_64.rpm
python3-devel-3.9.10-2.cm2.x86_64.rpm
python3-gpg-1.16.0-1.cm2.x86_64.rpm
python3-jinja2-3.0.3-2.cm2.noarch.rpm
python3-libs-3.9.10-1.cm2.x86_64.rpm
python3-libs-3.9.10-2.cm2.x86_64.rpm
python3-libxml2-2.9.13-1.cm2.x86_64.rpm
python3-magic-5.40-2.cm2.noarch.rpm
python3-markupsafe-2.1.0-1.cm2.x86_64.rpm
python3-newt-0.52.21-3.cm2.x86_64.rpm
python3-pip-3.9.10-1.cm2.noarch.rpm
python3-pip-3.9.10-2.cm2.noarch.rpm
python3-pygments-2.4.2-7.cm2.noarch.rpm
python3-rpm-4.17.0-3.cm2.x86_64.rpm
python3-setuptools-3.9.10-1.cm2.noarch.rpm
python3-test-3.9.10-1.cm2.x86_64.rpm
python3-tools-3.9.10-1.cm2.x86_64.rpm
python3-setuptools-3.9.10-2.cm2.noarch.rpm
python3-test-3.9.10-2.cm2.x86_64.rpm
python3-tools-3.9.10-2.cm2.x86_64.rpm
readline-8.1-1.cm2.x86_64.rpm
readline-debuginfo-8.1-1.cm2.x86_64.rpm
readline-devel-8.1-1.cm2.x86_64.rpm
Expand Down
1 change: 1 addition & 0 deletions toolkit/resources/manifests/package/update_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ generate_pkggen_core () {
grep "^dwz-" $TmpPkgGen
grep "^unzip-" $TmpPkgGen
grep "^python3-" $TmpPkgGen
grep "^python-unversioned-command-" $TmpPkgGen
grep "^which-" $TmpPkgGen
grep "^libselinux-" $TmpPkgGen
grep "^slang-[0-9]" $TmpPkgGen
Expand Down
2 changes: 2 additions & 0 deletions toolkit/scripts/toolchain/build_official_toolchain_rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ chroot_and_install_rpms gperf

# Python3 needs to be installed for RPM to build
build_rpm_in_chroot_no_install python3
copy_rpm_subpackage python-unversioned-command
rm -vf $FINISHED_RPM_DIR/python3*debuginfo*.rpm
chroot_and_install_rpms python3
chroot_and_install_rpms python-unversioned-command

# libxml2 is required for at least: libxslt, createrepo_c
build_rpm_in_chroot_no_install libxml2
Expand Down