-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTX-5485: Changes regarding decision to not use anymore coretex cli tool which was installed via pip. #249
Draft
bogdant36
wants to merge
15
commits into
coretex-ai:develop
Choose a base branch
from
bogdant36:CTX-5485-v1
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7378b02
saving changes.
2fc25d6
CTX-5458: Minor code upgrades, made necessary changes to make compile…
32c4bb5
no message
87800f3
CTX-5485: Changes regarding decision to not use anymore coretex cli t…
a827aea
saving changes, todo: make sh script compile.sh
e6986d5
CTX-5485: compile.sh script created for automatic compile of cli.
dd85839
CTX-5485: Added comments explaining why freeze.support() for multipro…
2040903
Merge branch 'develop' into CTX-5485-v1
3d1e1f6
CTX-5458: Changes regarding implementation of creating coretex.deb in…
4cbaa52
CTX-5845: .build dir created with necessary scripts for cli compilation
3426b3b
CTX-5485: Accidentally pushed bad stuff.
03a8d76
CTX-5485: Added bash script for macos installation package build.
da82d1c
CTX-5845: Discussion changes.
9013f1f
Merge branch 'develop' into CTX-5485-v1
7056dc4
Merge branch 'develop' into CTX-5485-v1
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Create a Python virtual environment | ||
python -m venv compile_env | ||
|
||
# Activate the virtual environment | ||
source compile_env/bin/activate | ||
|
||
# Install the current package and pyinstaller | ||
pip install .. pyinstaller | ||
|
||
# Run PyInstaller with the specified options | ||
pyinstaller ../main.py --onedir --name coretex --copy-metadata readchar --copy-metadata coretex --add-data "../coretex/resources/_coretex.py:coretex/resources" --workpath coretex --noconfirm | ||
|
||
# Deactivate and remove the virtual environment | ||
deactivate | ||
rm -rf compile_env | ||
rm -rf coretex.spec |
Binary file not shown.
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,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Define package name and directory structure | ||
PACKAGE_NAME="coretex" | ||
PACKAGE_DIR="${PACKAGE_NAME}" | ||
DEBIAN_DIR="${PACKAGE_DIR}/DEBIAN" | ||
BIN_DIR="${PACKAGE_DIR}/usr/local/bin" | ||
|
||
# Create the necessary directory structure | ||
mkdir -p "${DEBIAN_DIR}" | ||
mkdir -p "${BIN_DIR}" | ||
|
||
# Create a Python virtual environment | ||
python -m venv compile_env | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename the venv to |
||
|
||
# Activate the virtual environment | ||
source compile_env/bin/activate | ||
|
||
# Install the toml package (for generate_control.py) | ||
pip install toml | ||
|
||
# Move the entire dist/main directory contents directly to /usr/local/bin | ||
mv dist/coretex/* "${BIN_DIR}/" | ||
rm -rf dist/ | ||
|
||
# Generate the control file using Python (assuming you have the Python script ready) | ||
python generate_control.py | ||
|
||
# Deactivate and remove the virtual environment | ||
deactivate | ||
rm -rf compile_env | ||
|
||
# Build the .deb package | ||
dpkg-deb --build "${PACKAGE_DIR}" | ||
|
||
# Remove unnecessary dir's | ||
rm -rf "${PACKAGE_DIR}" |
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,32 @@ | ||
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}\n" | ||
f"Version: {version}\n" | ||
"Section: base\n" | ||
"Priority: optional\n" | ||
"Architecture: all\n" | ||
"Depends: python3\n" | ||
"Maintainer: Your Name < [email protected] >\n" | ||
f"Description: {description}\n" | ||
) | ||
|
||
# Write to control file | ||
with open(f"{packageName}/DEBIAN/control", "w") as controlFile: | ||
controlFile.write(controlContent) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Extract version from pyproject.toml | ||
VERSION=$(grep '^version = ' ../pyproject.toml | sed 's/version = "\(.*\)"/\1/') | ||
|
||
# Define package name and directory structure | ||
PACKAGE_NAME="coretex" | ||
PAYLOAD_DIR="dist/coretex/" | ||
|
||
# Build the .pkg package using pkgbuild | ||
pkgbuild --root "${PAYLOAD_DIR}" --identifier ai.coretex --version "${VERSION}" --install-location "/usr/local/bin" "${PACKAGE_NAME}.pkg" | ||
|
||
# Clean up | ||
rm -rf coretex/ | ||
rm -rf dist/ |
Empty file.
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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "dist/SOMETHING_SOMETHING"