Add pycups as optional install feature - #1900
Conversation
|
I think this should be added to the bench containerfile as well |
|
It might be helpful to add a “Print Server” setup example in |
|
@martkaczmarek do you plan to update this PR? |
|
@DanielRadlAMR sorry about that; I still need to finish and test everything on my end. Also, about docs: are you sure |
d77993f to
d628689
Compare
| && apt-get install -y ./$downloaded_file \ | ||
| && rm $downloaded_file \ | ||
| # Install cups | ||
| && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ |
There was a problem hiding this comment.
i'd use = "true" here
There was a problem hiding this comment.
Sure, I'll change that in all 3 files next commit
|
Hey again.
I'm not exactly sure what you mean here. Regarding the documentation, I think we should document somewhere how to enable the print server, since this is quite specific and difficult to figure out if it is not documented properly. What I wrote was only a suggestion though, so feel free to share your idea on that. Or do you think that adding:
to the build args is already enough documentation for others to understand it? |
This command: For now the only version I managed to put into dockerfile without build errors is this: I don't know enough about Python structure to figure out when in the build process (or with what user?) the About the docs: I really think the build args manual is the only suitable place. It's exactly the same as headless Chrome installation argument - it only matters in the build stage. After installing pycups and libraries inside the dockerfile, configuration is done and user should follow Frappe docs to configure printers in the app itself. Also: I do realize commits in this PR are a mess, I really should have tested it in a separate branch. After finishing here, I will open a separate PR with condensed commits. |
|
Thanks for the further explanation. TBH, I cannot tell you anything for sure here since I never used this myself — but I guess the best thing to do is some trial and error. Nevertheless, I just checked the docs, and I think you already found the solution. Currently: # Install pycups
&& if [ "$INSTALL_PYCUPS" != "false" ]; then pip install --no-cache-dir pycups; fi \But I think you need something like this instead: RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups(as you already mentioned in your previous comment) The difference here is which You either need to:
Okay, I guess no further docs are needed then. Just do me a favor and add a small note to the build args that For me, this was not obvious without checking other docs, so a short note there would make the build arg much clearer :) |
|
I'm closing this for now as I didn't have time to work on the feature. I'll reopen as new PR when I have something to show. |
This PR adds option to install pycups and dependencies to custom docker images, using INSTALL_PYCUPS build argument.
Resolves #1895.
Todo:
'layered' image changes
RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycupscommand