-
-
Notifications
You must be signed in to change notification settings - Fork 16
Packaging for Nix #391
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
base: main
Are you sure you want to change the base?
Packaging for Nix #391
Conversation
Signed-off-by: Chin Yeung Li <[email protected]>
Signed-off-by: Chin Yeung Li <[email protected]>
Signed-off-by: Chin Yeung Li <[email protected]>
Signed-off-by: Chin Yeung Li <[email protected]>
- Added --generate and --test options - Updated code structure/comments Signed-off-by: Chin Yeung Li <[email protected]>
|
@chinyeungli |
tdruez
left a comment
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.
$ python build_nix_docker.py
nix-prefetch-url is NOT installed.
The nix-prefetch-url requirement is not documented.
Also, you can remove all references to funcparserlib.
|
Yes. I am on it. For some reasons, it's not building at the moment and I am working on it. |
- Updated documentation for the installation process - Added special handling for "python_ldap", which requires specific dependencies when building from source - Refactored and updated helper functions Signed-off-by: Chin Yeung Li <[email protected]>
|
@tdruez script updated. |
tdruez
left a comment
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.
I was able to use the script to generate the Nix package.
Could you add a short section in the script doc on how to run the app from this build?
|
@tdruez but it only shows the CLI Should the binary be designed to launch the web server automatically when executed? Similar to what |
|
@chinyeungli I should be able to run the test suite to validate the package. |
…at runtime #339 Signed-off-by: Chin Yeung Li <[email protected]>
|
@tdruez I've updated the script and able to run the test with the following steps Create and configure a PostgreSQL user named dejacodeSets up environment variables and runs a test
|
Signed-off-by: Chin Yeung Li <[email protected]>
etc/scripts/build_nix_docker.py
Outdated
| if component.get("packagetype") == "bdist_wheel": | ||
| whl_url = component.get("url") | ||
| if ( | ||
| ("cp313" not in whl_url and "py3" not in whl_url) |
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.
You may want to look at https://github.com/aboutcode-org/python-inspector/blob/2a9f1287f33790cefa9f3e9599861f67b5305c85/src/python_inspector/utils_pypi.py#L1118 for tag matching ....
…lity #339 Signed-off-by: Chin Yeung Li <[email protected]>
Signed-off-by: Chin Yeung Li <[email protected]>
|
Comenthm |
|
`` |
Fixes #339
Generates a Nix expression (default.nix) from the pyproject.toml file that is used to build the Python package for NixOS.
Once the default.nix is generated, one can build/install the package by
using:
Build the package
The above command will create a symlink named
resultin the currentdirectory pointing to the build output in the Nix store.
Run the binary directly
Signed-off-by: Chin Yeung Li [email protected]