Should I Build a Package or Just Ship the Files for my Project? /u/Jax-22 Python Education

I’m working on a project to test specific devices and share the code with others. Here’s how my project is structured:

my_project - main.py - my_package - core.py # Contains functions to create tests - gui.py # Creates a PyQt6-based UI using core.py functions - __init__.py In the main.py I’m calling a function from gui.py to start the GUI.

Additionally, there are folders with setup configurations, logs, and data, but they peobably aren’t relevant to my main question.

My Current Workflow

  1. I create a single-folder executable from main.py using PyInstaller.
  2. I share this exe and its directory with other users, allowing them to run the tests without installing Python.

This approach works well for users who just need to run the preconfigured tests.

The Issue

Some users want to write their own test scripts using the functions in core.py. To support this, I see two options:

  1. Include all files from my_package in the PyInstaller bundle. This way, the users can either run the .exe or access core.py from the distributed exe directory.
  2. Package my project and distribute it via a private GitHub repo. Users would install the package via pip and also download main.py to run the preconfigured tests.

submitted by /u/Jax-22
[link] [comments]

​r/learnpython I’m working on a project to test specific devices and share the code with others. Here’s how my project is structured: my_project – main.py – my_package – core.py # Contains functions to create tests – gui.py # Creates a PyQt6-based UI using core.py functions – __init__.py In the main.py I’m calling a function from gui.py to start the GUI. Additionally, there are folders with setup configurations, logs, and data, but they peobably aren’t relevant to my main question. My Current Workflow I create a single-folder executable from main.py using PyInstaller. I share this exe and its directory with other users, allowing them to run the tests without installing Python. This approach works well for users who just need to run the preconfigured tests. The Issue Some users want to write their own test scripts using the functions in core.py. To support this, I see two options: Include all files from my_package in the PyInstaller bundle. This way, the users can either run the .exe or access core.py from the distributed exe directory. Package my project and distribute it via a private GitHub repo. Users would install the package via pip and also download main.py to run the preconfigured tests. submitted by /u/Jax-22 [link] [comments] 

I’m working on a project to test specific devices and share the code with others. Here’s how my project is structured:

my_project - main.py - my_package - core.py # Contains functions to create tests - gui.py # Creates a PyQt6-based UI using core.py functions - __init__.py In the main.py I’m calling a function from gui.py to start the GUI.

Additionally, there are folders with setup configurations, logs, and data, but they peobably aren’t relevant to my main question.

My Current Workflow

  1. I create a single-folder executable from main.py using PyInstaller.
  2. I share this exe and its directory with other users, allowing them to run the tests without installing Python.

This approach works well for users who just need to run the preconfigured tests.

The Issue

Some users want to write their own test scripts using the functions in core.py. To support this, I see two options:

  1. Include all files from my_package in the PyInstaller bundle. This way, the users can either run the .exe or access core.py from the distributed exe directory.
  2. Package my project and distribute it via a private GitHub repo. Users would install the package via pip and also download main.py to run the preconfigured tests.

submitted by /u/Jax-22
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *