Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A PDM plugin that packs your packages into a zipapp
pdm-packer requires Python >=3.7
On PDM 1.6.4+, you can install the plugin directly by:
$ pdm plugin add pdm-packer
If you have installed PDM with the recommended tool pipx
, add this plugin by:
$ pipx inject pdm pdm-packer
Or if you have installed PDM with pip install --user pdm
, install with pip
to the user site:
$ python -m pip install --user pdm-packer
Otherwise, install pdm-packer
to the same place where PDM is located.
$ pdm pack [common-options] [pack-options]
Common Options:
-h, --help
show this help message and exit
-v, --verbose
-v for detailed output and -vv for more detailed
-g, --global
Use the global project, supply the project root with
-p
option
-p PROJECT_PATH, --project PROJECT_PATH
Specify another path as the project root, which changes the base of pyproject.toml and
__pypackages__
Pack Options:
-m MAIN, --main MAIN
Specify the console script entry point for the zipapp
-o OUTPUT, --output OUTPUT
Specify the output filename. By default the file name will be inferred from the project name.
-c, --compress
Compress files with the deflate method, no compress by default
--pyc, --compile
Compile source into pyc files
--no-py
Remove the .py files in favor of .pyc files
-i INTERPRETER, --interpreter INTERPRETER
The Python interpreter path, default: the project interpreter
--exe
Create an executable file. If the output file isn't given, the file name will end with .exe(Windows) or no suffix(Posix)
See also: https://docs.python.org/3.9/library/zipapp.html
# Create with default name(<project_name>.pyz) and console_script as the __main__.py
pdm pack
# Create an executable file
pdm pack --exe
# Create with custom __main__.py and filename
pdm pack -o app.pyz -m app:main
--main
will be lost.pyinstaller
in the way that it doesn't embed a Python interpreter. This means you have to install a Python with exactly the same version on the deployment platform.__pypackages__
as well. Make sure you have set a project name in pyproject.toml
.By default, zipapp is created with .pyz
suffix. On Windows, if you have associted .pyz
files with Python program, you can run the app by double-clicking the file in the explorer. But if you create the app with --exe
turn on, you can have a .exe file on Windows and an executable file
on Unix-like systems, so that the app can be executed without a python
command prefixing it and
no matter you assoicated the file exensition properly or not.
See CHANGELOG.md
FAQs
A PDM plugin that packs your packages into a zipapp
We found that pdm-packer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.