-
Notifications
You must be signed in to change notification settings - Fork 0
Generate environment variable file on install #26
Comments
Creating a file on the system when installing packageSetuptools documentation: https://setuptools.readthedocs.io/en/latest/deprecated/distutils/setupscript.html?highlight=data_files#installing-additional-files Creating a file on the system after installing the package can be done within setup.py: ...
relativeDir = os.getcwd()
setup(
name="webqueue2_api",
version="0.9.1",
data_files=[(relativeDir, ['webqueue2-api.cfg'])]
)
... In the code above, The The
|
|
Create Config File FunctionFor now, due to the limitations of being able to get the directory from running the |
Update on functionalityThere is now (as of the latest commit in the feature-generate-environment-file-on-install branch) a script that will copy the Examplecreate_config("~/") # Creates webqueue2-api.cfg file in the users home directory
create_config("/tmp") # Creates webqueue2-api.cfg file in the /tmp directory Note: This script will need to be properly implemented as part of the webqueue2_api package after the Update package structure pull request is approved |
Code is ready in its own branch. Waiting for #20 |
Defaults have been replaced by dataclass configurations per package. Closing. |
When installing the webqueue2 API, it would be helpful to create a JWT key automatically if it does not exist in either the config file or an command line argument.
The text was updated successfully, but these errors were encountered: