We need to find a way to handle non-Python dependencies for our Python package in a centralized way so that the instructions of how to install them appear in one place only and can be parsed and reused wherever needed. This would be helpful for automating the installation process and avoiding duplication of instructions.
One possible solution is to create a separate file, such as non_python_dependencies.txt, that lists the non-Python dependencies along with their installation instructions. This file can be placed in the root directory of the project and parsed by different tools as needed. For example, the installation instructions in this file can be used in the following places:
In the "installation" section of the README.md: We can include a link to this file in the README.md, so that users can find instructions on how to install the non-Python dependencies alongside the Python dependencies.
In the "Install dependencies" section of the ci.yml CI configuration file: We can use the instructions in this file to install the non-Python dependencies in the CI environment before running the tests.
In the setup.py file so that the installation can happen automatically: We can include code in the setup.py file that reads the non_python_dependencies.txt file and installs the required dependencies automatically during the installation process.
Pros:
Centralized instructions: By using a separate file to list the non-Python dependencies and their installation instructions, we can avoid duplication of instructions and ensure that they are consistent across different tools.
Easy to maintain: If we need to update the installation instructions for non-Python dependencies, we only need to update the non_python_dependencies.txt file, and the changes will be reflected in all the places where the instructions are used.
Automation: By including code in the setup.py file to install the non-Python dependencies automatically, we can make the installation process more user-friendly and automate it.
Cons:
(Just to try to be balances -- but to be fair, they should considered, but seem minor.)
Extra maintenance: There is an extra file to maintain, which could be a burden if the instructions change frequently.
System-dependent instructions: Non-Python dependencies often require system-specific installation instructions, which may be difficult to include in a centralized way. We need to condition the our instructions on each operating system, and gracefully handle cases where something goes wrong (for example, due to system or environment particularities). For example, we can invite the user, at that point, to use the package with reduced functionality or try to install manually, referring them to the manual instructions (via a LINK to it, to make the UX smooth!).
Note: An alternative to having a separate non_python_dependencies.txt file would be to include the specification in an existing file (setup.cfg, ci.yml or even README.md) and parse it out from there.
We need to find a way to handle non-Python dependencies for our Python package in a centralized way so that the instructions of how to install them appear in one place only and can be parsed and reused wherever needed. This would be helpful for automating the installation process and avoiding duplication of instructions.
One possible solution is to create a separate file, such as
non_python_dependencies.txt
, that lists the non-Python dependencies along with their installation instructions. This file can be placed in the root directory of the project and parsed by different tools as needed. For example, the installation instructions in this file can be used in the following places:In the "installation" section of the
README.md
: We can include a link to this file in the README.md, so that users can find instructions on how to install the non-Python dependencies alongside the Python dependencies.In the "Install dependencies" section of the ci.yml CI configuration file: We can use the instructions in this file to install the non-Python dependencies in the CI environment before running the tests.
In the setup.py file so that the installation can happen automatically: We can include code in the setup.py file that reads the
non_python_dependencies.txt
file and installs the required dependencies automatically during the installation process.Pros:
Cons:
(Just to try to be balances -- but to be fair, they should considered, but seem minor.)
Note: An alternative to having a separate
non_python_dependencies.txt
file would be to include the specification in an existing file (setup.cfg
,ci.yml
or evenREADME.md
) and parse it out from there.