Skip to content

Commit 57621be

Browse files
committed
Switch to dist-info from egg-info
dist-info is the new standard and egg-info is deprecated. Change the directory name and PKG-INFO is now called METADATA.
1 parent a43280b commit 57621be

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ tests/.tests
2323
tests/testFailedTests/python
2424
tests/testFailedTests/tests/.tests
2525
.coverage
26-
python/*.egg-info/
26+
python/*.dist-info/

python/lsst/sconsUtils/builders.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,12 +654,12 @@ def PackageInfo(self, pythonDir, versionString=None):
654654
pythonPackageName = "lsst_" + state.env["packageName"]
655655
else:
656656
pythonPackageName = state.env["packageName"]
657-
eggDir = os.path.join(pythonDir, f"{pythonPackageName}.egg-info")
658-
filename = os.path.join(eggDir, "PKG-INFO")
657+
eggDir = os.path.join(pythonDir, f"{pythonPackageName}.dist-info")
658+
filename = os.path.join(eggDir, "METADATA")
659659
oldMd5 = _calcMd5(filename)
660660

661-
def makePackageInfo(target, source, env):
662-
# Create the PKG-INFo metadata.
661+
def makePackageMetadata(target, source, env):
662+
# Create the metadata file.
663663
try:
664664
version = determineVersion(state.env, versionString)
665665
except RuntimeError:
@@ -675,7 +675,9 @@ def makePackageInfo(target, source, env):
675675
state.log.info(f'PackageInfo(["{target[0]}"], [])')
676676

677677
results = []
678-
results.append(self.Command(filename, [], self.Action(makePackageInfo, strfunction=lambda *args: None)))
678+
results.append(
679+
self.Command(filename, [], self.Action(makePackageMetadata, strfunction=lambda *args: None))
680+
)
679681

680682
# Create the entry points file if defined in the pyproject.toml file.
681683
entryPoints = {}

0 commit comments

Comments
 (0)