-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CTX-5458: Changes regarding implementation of creating coretex.deb in…
…stallation package for debian.
- Loading branch information
Bogdan Tintor
committed
Aug 20, 2024
1 parent
2040903
commit 3d1e1f6
Showing
2 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import toml | ||
|
||
|
||
def main() -> None: | ||
# Load data from pyproject.toml | ||
with open("pyproject.toml", "r") as f: | ||
pyproject = toml.load(f) | ||
|
||
# Extract necessary information | ||
packageName = pyproject['project']['name'] | ||
version = pyproject['project']['version'] | ||
description = pyproject['project']['description'] | ||
|
||
# Create control file content | ||
controlContent = f""" | ||
Package: {packageName} | ||
Version: {version} | ||
Section: base | ||
Priority: optional | ||
Architecture: all | ||
Depends: python3 | ||
Maintainer: Your Name <[email protected]> | ||
Description: {description} | ||
""" | ||
|
||
# Write to control file | ||
with open(f"{packageName}/DEBIAN/control", "w") as controlFile: | ||
controlFile.write(controlContent) | ||
|
||
if __name__ == "__main__": | ||
main() |