Skip to content

Commit 98eea14

Browse files
committed
Release version 0.0.0.dev447
1 parent 4028837 commit 98eea14

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

pkg/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespaces = true
1717
# ----------------------------------------- Project Metadata -------------------------------------
1818
#
1919
[project]
20-
version = "0.0.0.dev446"
20+
version = "0.0.0.dev447"
2121
name = "ControlMan"
2222
dependencies = [
2323
"packaging >= 23.2, < 24",

pkg/src/controlman/file_gen/python.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def conda(self):
8484
else:
8585
changelog = {}
8686
for typ, changelog in (("local", None), ("global", changelog)):
87+
if "conda" not in self._pkg:
88+
continue
8789
meta = CondaRecipeGenerator(
8890
meta=self._pkg["conda.recipe.meta"],
8991
pkg=self._pkg,
@@ -272,14 +274,14 @@ def pyproject(self) -> list[DynamicFile]:
272274
},
273275
}
274276
out = {}
275-
for key, value in self._pkg["pyproject"].items():
277+
for key, value in sorted(self._pkg["pyproject"].items()):
276278
if not value:
277279
continue
278280
if key in pyproject:
279281
out[key] = self._convert_to_toml_format(data=value, types=pyproject[key])
280282
else:
281283
out[key] = value
282-
file_content = _ps.write.to_toml_string(data=out, sort_keys=False)
284+
file_content = _ps.write.to_toml_string(data=out, sort_keys=True)
283285
file = DynamicFile(
284286
type=DynamicFileType.PKG_CONFIG,
285287
subtype=(f"{self._type}_pyproject", f"{self._type.upper()} PyProject"),
@@ -292,7 +294,7 @@ def pyproject(self) -> list[DynamicFile]:
292294
@staticmethod
293295
def _convert_to_toml_format(data: dict, types: dict) -> dict:
294296
out = {}
295-
for key, val in data.items():
297+
for key, val in sorted(data.items()):
296298
if not val:
297299
continue
298300
if key in types:

0 commit comments

Comments
 (0)