Questions tagged [zipapp]

This module provides tools to manage the creation of zip files containing Python code, which can be executed directly by the Python interpreter.

This module provides tools to manage the creation of zip files containing Python code, which can be executed directly by the Python interpreter.

21 questions
0
votes
2 answers

Can I create an executable Python zip archive with dependencies?

I have a small python application developed on Nix that I wish to distribute to some M$ Windows users. It seems that an executable Python zip archive is an excellent way to achieve this. However, I would like to include dependencies that are not…
Psionman
  • 3,084
  • 1
  • 32
  • 65
0
votes
1 answer

How can I know if my python script is running within zipapp package?

I have a python script that uses the __file__ variable to take some action. This was working fine before I used zipapp since __file__ matched the actual running file. Now I am starting to use zipapp and the logic doesn't work anymore, because…
0
votes
1 answer

Store python zipapp (`.pyz`) on PyPi Nexus

I use Python zipapp (more precisely shiv) to ship Python module. I would like to store generated zipapp (.pyz) on Nexus (ideally pypi on Nexus) to keep track of my built artifact in a CI/CD pipeline. How can I upload .pyz on Nexus? Is it possible to…
Thomas
  • 1,164
  • 13
  • 41
0
votes
1 answer

How to make a zipapp of current directory?

From what I understand python -m zipapp myapp creates a .pyz file of the directory named myapp. How do i create a .pyz of the current folder in which my working directory is set. I tried python -m zipapp . which doesnt work. What would be the exact…
0
votes
0 answers

executing a pyz file thru SSH fails with invalid syntax. Why?

I want to execute a pyz file over SSH in this way: cat test.pyz | ssh -M user@somehost python The current output is this: File "", line 1 PKimport sys ^ SyntaxError: invalid syntax The host/endpoint is a Windows machine. I…
subzero
  • 3,420
  • 5
  • 31
  • 40
0
votes
1 answer

How to load Hy package in zipapp?

I have a Python script (as entry point), a Hy library (simply add two columns) and an input data file: $ cat add_cols/app.py import hy import sys from mylib import add2col def main(): inp = sys.argv[1] out = sys.argv[2] print(f'read…
Leo
  • 1,710
  • 2
  • 26
  • 29
1
2