Skip to content

Commit 8442f67

Browse files
committed
Remove x86 linux builds from code
1 parent cd8c924 commit 8442f67

File tree

10 files changed

+18
-104
lines changed

10 files changed

+18
-104
lines changed

CMakeLists.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
2828
message(FATAL_ERROR "Require at least gcc-9.0")
2929
endif()
3030

31-
if(USE_64BIT_BUILD)
32-
message(STATUS "Setting GCC flags (64bit)")
33-
set(CMAKE_LIBRARY_ARCHITECTURE x86_64-linux-gnu)
34-
set(CMAKE_CXX_FLAGS "-O3 -s -fPIC -pthread")
35-
set(CMAKE_PREFIX_PATH "@Pythia/python-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-embed-linux64")
36-
else()
37-
message(STATUS "Setting GCC flags (32bit)")
38-
set(CMAKE_LIBRARY_ARCHITECTURE i386-linux-gnu)
39-
set(CMAKE_CXX_FLAGS "-O3 -s -fPIC -pthread -march=i686 -m32")
40-
set(CMAKE_PREFIX_PATH "@Pythia/python-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-embed-linux32")
41-
endif()
31+
message(STATUS "Setting GCC flags (64bit)")
32+
set(CMAKE_LIBRARY_ARCHITECTURE x86_64-linux-gnu)
33+
set(CMAKE_CXX_FLAGS "-O3 -s -fPIC -pthread")
34+
set(CMAKE_PREFIX_PATH "@Pythia/python-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}-embed-linux64")
4235

4336
else() # MSVC
4437
if(CMAKE_SIZEOF_VOID_P LESS 8)

CMakeSettings.json

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,45 +41,15 @@
4141
"variables": [
4242
{
4343
"name": "CMAKE_C_COMPILER",
44-
"value": "/usr/bin/gcc-9",
44+
"value": "/usr/bin/gcc",
4545
"type": "FILEPATH"
4646
},
4747
{
4848
"name": "CMAKE_CXX_COMPILER",
49-
"value": "/usr/bin/g++-9",
49+
"value": "/usr/bin/g++",
5050
"type": "FILEPATH"
5151
}
5252
]
53-
},
54-
{
55-
"name": "x86-WSL-GCC-Release",
56-
"generator": "Ninja",
57-
"configurationType": "RelWithDebInfo",
58-
"buildRoot": "${projectDir}\\out\\build\\${name}",
59-
"installRoot": "${projectDir}\\out\\install\\${name}",
60-
"cmakeExecutable": "cmake",
61-
"cmakeCommandArgs": "",
62-
"buildCommandArgs": "",
63-
"ctestCommandArgs": "",
64-
"inheritEnvironments": [ "linux_x86" ],
65-
"wslPath": "${defaultWSLPath}",
66-
"variables": [
67-
{
68-
"name": "CMAKE_C_COMPILER",
69-
"value": "/usr/bin/gcc-9",
70-
"type": "FILEPATH"
71-
},
72-
{
73-
"name": "CMAKE_CXX_COMPILER",
74-
"value": "/usr/bin/g++-9",
75-
"type": "FILEPATH"
76-
},
77-
{
78-
"name": "USE_64BIT_BUILD",
79-
"value": "OFF",
80-
"type": "STRING"
81-
}
82-
]
8353
}
8454
]
8555
}

Dockerfile.x86

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,7 @@ Run this on Windows (requires WSL2 and Docker to be installed and configured!)
279279

280280
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
281281

282-
# Setup WSL for both x86 and x64 architectures
283-
wsl /bin/bash -ic "sudo dpkg --add-architecture i386"
284-
wsl /bin/bash -ic "sudo apt update"
285-
wsl /bin/bash -ic "sudo apt install python3-pip patchelf libcrypt1:i386 clang gcc-multilib"
282+
# Setup uv on WSL
286283
wsl /bin/bash -ic "curl -LsSf https://astral.sh/uv/install.sh | sh"
287284

288285
uv run tools\rebuild_all.py

src/Pythia/Paths.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
#define EMBEDDEDPYTHONPATH L"python-" PYTHON_VERSION "-embed-win32"
1111
#endif
1212
#else // ifdef _WIN32
13-
#if defined(__amd64__) || defined(_M_X64) /* x86_64 arch */
1413
#define EMBEDDEDPYTHONPATH "python-" PYTHON_VERSION "-embed-linux64"
15-
#else
16-
#define EMBEDDEDPYTHONPATH "python-" PYTHON_VERSION "-embed-linux32"
17-
#endif
1814
#endif
1915

2016
std::string GetCurrentWorkingDir()

templates/install_requirements32.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

tools/build.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def create_interpreters(version, dest):
8383
def _get_embed(version, system, arch):
8484
embed = {
8585
'linux': {
86-
'x86': os.path.join('@Pythia', f'python-{version.major}{version.minor}-embed-linux32', 'bin', 'python3'),
8786
'x64': os.path.join('@Pythia', f'python-{version.major}{version.minor}-embed-linux64', 'bin', 'python3'),
8887
},
8988
'windows': {
@@ -103,19 +102,22 @@ def build_binaries(version, arch, system, run_tests=True):
103102
env = None
104103
else:
105104
env = setuptools.msvc.msvc14_get_vc_env(arch)
105+
# env = os.environ.copy()
106+
# msvc_env = setuptools.msvc.EnvironmentInfo(arch).return_env()
107+
# env.update(msvc_env)
108+
# print(env)
106109

107110
if os.path.exists('ninja'):
108111
shutil.rmtree('ninja')
109112
os.makedirs('ninja')
110113

111114
if system == 'linux':
112-
platform = ['--platform', 'linux/386'] if arch == 'x86' else []
113-
_verbose_run(['docker', 'build', '-f', f'Dockerfile.{arch}'] + platform + ['-t', 'pythia:latest', '.'], check=True)
115+
_verbose_run(['docker', 'build', '-f', f'Dockerfile.{arch}', '-t', 'pythia:latest', '.'], check=True)
114116
# Workaround for GitHub Actions
115117
# This is to fix GIT not liking owner of the checkout dir (git callback in cmake)
116118
# https://github.com/actions/runner/issues/2033
117119
uid_gid = ['-u', f'{os.getuid()}:{os.getgid()}'] if sys.platform == 'linux' else []
118-
docker_prefix = ['docker', 'run'] + platform + uid_gid + ['--rm', '-v', f'{os.getcwd()}/:/data', '-w', '/data/ninja', 'pythia:latest']
120+
docker_prefix = ['docker', 'run'] + uid_gid + ['--rm', '-v', f'{os.getcwd()}/:/data', '-w', '/data/ninja', 'pythia:latest']
119121
shell = False
120122
else:
121123
docker_prefix = []

tools/create_embedded_python.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
EMBED_DIR = 'python-{version_short}-embed-{arch}'
1212
ARCHITECTURES_WINDOWS = ['win32', 'amd64']
13-
ARCHITECTURES_LINUX = ['linux32', 'linux64']
13+
ARCHITECTURES_LINUX = ['linux64']
1414
ARCHITECTURES_CURRENT = ARCHITECTURES_WINDOWS if platform.system() == 'Windows' else ARCHITECTURES_LINUX
1515
STANDALONE_MAPPING = {
16-
'linux32': 'cpython-{version}-linux-x86-gnu',
1716
'linux64': 'cpython-{version}-linux-x86_64-gnu',
1817
'win32': 'cpython-{version}-windows-x86-none',
1918
'amd64': 'cpython-{version}-windows-x86_64-none',
@@ -46,12 +45,6 @@ def convert_standalone_build(directory):
4645

4746
if platform.system() == 'Linux':
4847
dereference_symlinks('.')
49-
# Note: both adding the rpath and copying libcrypt will be unnecessary with 3.11+
50-
subprocess.run("patchelf --set-rpath '$ORIGIN/../lib' bin/python3", shell=True, check=True)
51-
current_dir = os.getcwd()
52-
subprocess.run('docker run --platform linux/386 --rm -v "$(pwd)"/:/data quay.io/pypa/manylinux2014_i686:latest /bin/bash -c "cp /usr/local/lib/libcrypt.so.1 /data/ && chown 1000:1000 /data/libcrypt.so.1 && chmod 555 /data/libcrypt.so.1"',
53-
shell=True, cwd='lib', check=True)
54-
os.chdir(current_dir)
5548

5649
os.chdir(currdir)
5750

tools/rebuild32.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

tools/rebuild_all.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ def rebuild_all(args):
3636

3737
platform = 'windows' if sys.platform != 'linux' else sys.platform
3838

39-
build_binaries(args.version, 'x86', platform)
39+
if platform != 'linux':
40+
build_binaries(args.version, 'x86', platform)
4041
build_binaries(args.version, 'x64', platform)
4142

4243
if should_run_tests:
43-
run_tests(args.version, 'x86', platform)
44+
if platform != 'linux':
45+
run_tests(args.version, 'x86', platform)
4446
run_tests(args.version, 'x64', platform)
4547

4648
if args.wsl:

0 commit comments

Comments
 (0)