Skip to content

Commit

Permalink
Switch to dist-info from egg-info
Browse files Browse the repository at this point in the history
dist-info is the new standard and egg-info is deprecated.
Change the directory name and PKG-INFO is now called METADATA.
  • Loading branch information
timj committed Nov 27, 2024
1 parent a43280b commit 57621be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ tests/.tests
tests/testFailedTests/python
tests/testFailedTests/tests/.tests
.coverage
python/*.egg-info/
python/*.dist-info/
12 changes: 7 additions & 5 deletions python/lsst/sconsUtils/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,12 @@ def PackageInfo(self, pythonDir, versionString=None):
pythonPackageName = "lsst_" + state.env["packageName"]
else:
pythonPackageName = state.env["packageName"]
eggDir = os.path.join(pythonDir, f"{pythonPackageName}.egg-info")
filename = os.path.join(eggDir, "PKG-INFO")
eggDir = os.path.join(pythonDir, f"{pythonPackageName}.dist-info")
filename = os.path.join(eggDir, "METADATA")
oldMd5 = _calcMd5(filename)

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

results = []
results.append(self.Command(filename, [], self.Action(makePackageInfo, strfunction=lambda *args: None)))
results.append(
self.Command(filename, [], self.Action(makePackageMetadata, strfunction=lambda *args: None))
)

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

0 comments on commit 57621be

Please sign in to comment.