Perl package: change attr to method (#36580)

This fixes a bug in the Windows build of Perl.

An attribute defined in package class is inaccessible from the install
method due to builder: refactor it to be a method.
This commit is contained in:
John W. Parent 2023-03-31 21:57:55 -04:00 committed by GitHub
parent 1175831203
commit d79c8179fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,7 +213,6 @@ def do_stage(self, mirror_only=False):
perm = os.stat(filename).st_mode
os.chmod(filename, perm | 0o200)
@property
def nmake_arguments(self):
args = []
if self.spec.satisfies("%msvc"):
@ -304,7 +303,7 @@ def install(self, spec, prefix):
if sys.platform == "win32":
win32_dir = os.path.join(self.stage.source_path, "win32")
with working_dir(win32_dir):
nmake("install", *self.nmake_arguments, ignore_quotes=True)
nmake("install", *self.nmake_arguments(), ignore_quotes=True)
else:
make("install")