Skip to content
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

Bug: standalone packaging issues #161

Open
3 of 4 tasks
GuillaumeQuenneville opened this issue May 28, 2024 · 1 comment
Open
3 of 4 tasks

Bug: standalone packaging issues #161

GuillaumeQuenneville opened this issue May 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@GuillaumeQuenneville
Copy link

GuillaumeQuenneville commented May 28, 2024

Description

Hi, I was looking for references to make a standalone litestar (trying to avoid rewriting part of our backend in node for our electron app) and I ran across a few issues. I'd be happy to make a PR with fixes based on feedback.

  • jsbeautifier only has a source distribution see here. This conflicts with the "PYAPP_PIP_EXTRA_ARGS": "--only-binary :all:" setting. jsbeautifier seems to be a requirement for the cli dependencies. We can remove the extra args for now, but binary only is a good sanity check for making sure that clients can install without a build toolchain. So it would be nice to have a binary only install possible. We could also specify the the format control but but it doesn't seem to support :all: + explicit excludes pip issue. Only explicit includes, so we would have to explicitly set all the deps for binary only which would be a pita unless there's a programmatic way of doing it.
  • The export of the requirements.txt is not required if you have a wheel file which is the current default. We can maybe leave those lines as a comment. I personally use hatch which doesn't have an equivalent export.
  • wget and tar subprocess calls are not generally portable (cuz of windows), and the standalones created by pyapp is platform specific without cross compilation. We should use equivalent python stdlib functionality to do those steps (urllib.request and tarfile resp.)

P.S. I didn't run the repo, I was taking parts of it for inspiration. But as far as I can tell, these all affect the main repo.

URL to code causing the issue

https://github.com/litestar-org/litestar-fullstack/blob/main/scripts/post-builds.py

MCVE

# Your MCVE code here

Steps to reproduce

steps for jsbeautifier issue.

1 - compile pyapp (suceeds)
2 - run pyapp, fails at env resolution

Screenshots

"In the format of: ![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"

Logs

*** jsbeautifier conflict log ***

The conflict is caused by:
    litestar[standard] 2.8.3 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.8.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.8.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.8.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.7.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.7.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.7.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.6.4 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.6.3 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.6.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.6.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.6.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.5 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.4 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.3 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.5.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.5 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.4 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.3 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.4.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.3.2 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.3.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.3.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.2.1 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.2.0 depends on jsbeautifier; extra == "standard"
    litestar[standard] 2.1.1 depends on jsbeautifier; extra == "cli" or extra == "standard" or extra == "full"
    litestar[standard] 2.1.0 depends on jsbeautifier; extra == "cli" or extra == "standard" or extra == "full"
    litestar[standard] 2.0.1 depends on jsbeautifier; extra == "cli" or extra == "standard" or extra == "full"
    litestar[standard] 2.0.0 depends on jsbeautifier; extra == "cli" or extra == "standard" or extra == "full"

Package Version

All

Platform

  • Linux
  • Mac
  • Windows
  • Other (Please specify in the description above)
@GuillaumeQuenneville GuillaumeQuenneville added the bug Something isn't working label May 28, 2024
@cofin
Copy link
Member

cofin commented May 30, 2024

@GuillaumeQuenneville I'd be happy to accept a PR here. This was an area where I'd been doing a lot experimenting, so it's nice to see others taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants