Skip to content
Open
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
30 changes: 30 additions & 0 deletions repos/spack_repo/builtin/packages/sepp/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ class Sepp(Package):

extends("python")

def patch(self):
# setup.py bootstraps via a 2010-era "distribute_setup.py" helper
# (from back when setuptools/distribute were separate forks) and
# separately imports "from distutils.core import setup, Command"
# directly. distutils was removed from the stdlib in Python 3.12+,
# breaking both. setuptools has been a strict superset for over a
# decade (find_packages is already imported from it two lines
# above) and setuptools.Command is a drop-in replacement -- the
# docstring on the Command subclass below even says "setuptools
# Command". Drop the obsolete bootstrap entirely and import
# setup/Command from setuptools instead.
filter_file(
"from distribute_setup import use_setuptools\n",
"",
"setup.py",
string=True,
)
filter_file(
"from distutils.core import setup, Command",
"from setuptools import setup, Command",
"setup.py",
string=True,
)
filter_file(
'use_setuptools(version="0.6.24")\n',
"",
"setup.py",
string=True,
)

def install(self, spec, prefix):
dirs = ["sepp", "tools"]
for d in dirs:
Expand Down
Loading