Skip to content

PyOxidizer support #18

Open
Open

Description

@jayvdb

https://github.com/indygreg/PyOxidizer/ is really interesting, especially as it has decided to not support __file__ (indygreg/PyOxidizer#69).

https://github.com/storyscript/community/issues/8#issuecomment-540956151 has a survey of the other similar tools.

If PyOxidizer works with lml, the others should also work.

The ability to ship a moban standalone binary with all deps, and extensions, included, would be fantastic ;-)

It would be ok even if some lml functionality is degraded because of no __file__.

PyOxidizer can be detected with sys.oxidized, and other similar tools usually set sys._MEIPASS.

Currently tests fail quite badly on PyOxidizer and other similar tools.

Activity

  1. chfw commented on Nov 14, 2019

    @chfw
    Collaborator

    I can give it a try.

  2. chfw commented on Dec 4, 2019

    @chfw
    Collaborator

    I see what you meant now

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "moban.main", line 19, in <module>
      File "moban.constants", line 1, in <module>
      File "moban.externals.file_system", line 10, in <module>
      File "fs.multifs", line 15, in <module>
      File "fs.base", line 28, in <module>
      File "fs.time", line 14, in <module>
      File "pytz", line 172, in timezone
      File "pytz", line 198, in _case_insensitive_zone_lookup
      File "pytz.lazy", line 101, in _lazy
      File "pytz", line 1104, in <genexpr>
      File "pytz", line 114, in resource_exists
      File "pytz", line 95, in open_resource
    NameError: name '__file__' is not defined
    error: cargo run failed
    
  3. chfw commented on Dec 4, 2019

    @chfw
    Collaborator

    @jayvdb , from above log, "pytz" is a blocker too, "lml" can be one.

    pyexcel users has been using pyinstaller to make one executable, successfully. But of course, for windows only.

  4. chfw commented on Dec 4, 2019

    @chfw
    Collaborator

    here's the sample instructions for lml enabled modules:

    http://docs.pyexcel.org/en/latest/pyinstaller.html

  5. chfw commented on Dec 4, 2019

    @chfw
    Collaborator

    I just read that you have already dis-approved pyinstaller in your post :/

  6. jayvdb commented on Dec 5, 2019

    @jayvdb
    Author

    The pytz problem can be avoided using envvar PYTZ_TZDATADIR

    I have a more general fix for __file__ problems - should be published soon-ish.
    I havent tried to apply my workaround for the lml __file__ problems, as it is more complicated here than in most packages.

    PyOxidizer is quite different from PyInstaller - it is statically built only needing a single binary, all resources included, and it doesnt support __file__ because that is illogical for a static binary, and any use of __file__ which isnt guarded by an exception block is error prone, as __file__ is not a mandatory attribute for modules.

  7. chfw commented on Dec 7, 2019

    @chfw
    Collaborator

    I am afraid PyOxidizer has a long to go before it reaches lml. I am not denying the fact that lml won't fit PyOxidizer. I am trying to say: PyOxidizer are not the right tool to the goal: single binary distribution, because it is not mature.

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "moban.main", line 19, in <module>
      File "moban.constants", line 1, in <module>
      File "moban.externals.file_system", line 10, in <module>
      File "fs.multifs", line 15, in <module>
      File "fs.base", line 28, in <module>
      File "fs.time", line 14, in <module>
      File "pytz", line 181, in timezone
    pytz.exceptions.UnknownTimeZoneError: 'GMT'
    
  8. jayvdb commented on Dec 8, 2019

    @jayvdb
    Author

    Ya, I havent looked at fs2 yet, but this is about lml, not moban.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions