-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sapling getdeps cli build and test support for python 3.12
Summary: Ubuntu 24.04 and Fedora 40 are both python 3.12 based. Update sapling's OSS getdeps build to allow build/run/test on python 3.12 while keeping 3.10 support. * distutils is deprecated in python 3.12 stdlib, but fortunately setuptools is pretty similar and includes a vendored distutils, so updated to use setuptools's version and removed deprecated usage like `find_executable` in favor of `shutil.which()`. * added a manifest so we get python3-setuptools installed. * found some tests needed bunzip2, so update manifest for sapling and bz2 to install it * util.py makedate(): datetime.utcfromtimestamp is deprecated in 3.12, so updated to use non-deprecated methods.. Tested with test-command-template.t which shows tz offset. * Makefile: disabled a few tests on 3.12 where updating the expectation to run on 3.12 and 3.10 is tricky * tests modified to run on 3.12 and 3.10: * test-import-eol.t: updated for invalid escape sequence warnings * test-install.t: updated to filter out message that appears in different order on 3.12 vs earlier versions * test-sign-commit.t: updated to add --yes for newer gpg that python 3.12 using distros have Test Plan: enter ubuntu 24.04 toolbox: `toolbox enter ubuntu-toolbox-24.04 ` make sure system packages are installed `./build/fbcode_builder/getdeps.py install-system-deps --recursive sapling` check oss non-thrift build: ``` make oss $ ./sl --version Fri Oct 4 17:14:19 BST 2024 Sapling 4.4.2_20241004_170203_06bd09bd1dd2 (see https://sapling-scm.com/ for more information) ``` build sapling getdepts `./build/fbcode_builder/getdeps.py build --allow-system-packages --no-facebook-internal --src-dir=. sapling --project-install-prefix sapling:/` run the tests locally to validate python 3.12 operation: ``` ./build/fbcode_builder/getdeps.py --allow-system-packages test --src-dir=. sapling --num-jobs=64 --project-install-prefix sapling:/' ``` generate github actions CI to pick up python3-setuptools ``` ./build/fbcode_builder/getdeps.py --allow-system-packages generate-github-actions --free-up-disk --os-type=linux --src-dir=. --output-dir=.github/workflows --job-name "Sapling CLI Getdeps " --job-file-prefix=sapling-cli-getdeps_ sapling --num-jobs=16 --project-install-prefix sapling:/ ``` github CI
- Loading branch information
Showing
14 changed files
with
100 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
import os | ||
import re | ||
import sys | ||
import setuptools | ||
from distutils.version import LooseVersion | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.