Latest version

Jul 03, 2021 Generic Usage. To package an application, run: $ pup package pip-install-src. Where: pip-install-src is the argument in the pip install pip-install-src command to install the application on the local Python environment. In general, if it’s pip -installable then it’s probably pup -packageable. Installing an official release with pip ¶ This is the recommended way to install Django. The easiest is to use the standalone pip installer. If your distribution already has pip installed, you might need to update it if it’s outdated. If it’s outdated, you’ll know because installation won’t work.

Released:

Pluggable Micro Packager

Project description

pup is (in the early stages of becoming) a packaging tool for Python GUI programs.

Fundamentally,its raison d’être is producing macOS and Windows native packagesfor distributing the Mu Editorto Python beginners around the world.As a by-product of that,it may very likely be effective at packaginggeneric Python written GUI programs.If that ever is the case,then great.Otherwise,that’s fine too.

The purpose,again,is to package Mu Editorfor macOS and Windows distribution.

Capabilities

The current version of pup,while still very limited and somewhat exploratory,can package,at least,the Mu Editorand puppy into distributable:

  • Windows MSI installer files

    Minimally featured, user-installable,with an optional License Agreement GUI,adding an entry to the Windows Start Menu,with an optional custom icon.

    The packaged binary files can be signed,as well as the final MSI file.

    As a side-effect of the process,a relocatable directory holding the aplication is produced,paving the way for the creation “portable” Windows applications.

  • macOS DMG files

    Holding the relocatable .app application bundle,with an optional custom icon,properly signed and notarized as required for distribution,

    Including an optional License Agreement GUIand custom volume icon.

As of this writing,pup should be able to package any Python GUI application that:

  • Runs on Python 3.7 or 3.8, on macOS or Windows.
  • Is pip-installable (no need to be on PyPI, though).
  • Is launchable from the CLI with python -m<launch-module>.

No specific efforts have been put forth to ensure that that is the case,however,so YMMV.

Installation

Install

pup is distributed via PyPI.Install it with:

Pip

Generic Usage

To package an application, run:

Where:

  • <pip-install-src> is the argumentin the pip install <pip-install-src> commandto install the application on the local Python environment.

    In general,if it’s pip-installable then it’s probably pup-packageable.

This usage patternassumes that the application GUI is launchable with python -m <name>,where <name> is extractedfrom the metadata of a wheel created from <pip-install-src>.If that is not the case,pup can be told otherwise.Read on.

When completed,the final distributable artifact will be placed under ./dist/.

Dmg

Packaging Options

  • Use --launch-module=<name>to set the module namethat should be used to launch the application GUI,as with the python -m <name> command.

  • Use --nice-name=<name>to set a “nice name” for the applicationto be used used throughout the packaging process:in file and directory names,for macOS’s application bundle and DMG file names,and for the Windows Start Menu entry.

    When omitted,that name is obtained from the metadata of a wheelcreated from <pip-install-src>,that very often does not match the exact product spelling,as communicated to end-users.

  • Use --icon-path=<icon-path>to include a custom icon in the packaging process.

    On macOS the given file should be anICNS filewhich will be used as the icon for both the packaged application bundleand the DMG file volume icon.

    On Windows the file should be anICO filewhich will be used on the Windows Start Menu entry andon the Windows Programs and Features listing.

  • Use --license-path=<license-path> to bundle the given license textand require users to accept it before installation.

    The given <license-path> must be an ASCII-encoded text file.

Signing

Signing is optional and varies slightly between platforms.

pup will only sign the application for distributionwhen all of the following conditions are true.On macOS,pup will also complete the Apple required notarization process:for that,the packaging system must be online andable to connect to Apple’s notarization servicesover the internet.

Install pip mac

macOS

  • XCode 10.3 or later must be installed– the Command Line Tools are not enough.
  • The following environment variables must be set:
    • PUP_SIGNING_IDENTITY:10-digit identifier on the Apple Developer Certificate.
    • PUP_NOTARIZE_USER:email address for the Apple Developer Account.
    • PUP_NOTARIZE_PASSWORD:Application Specific Password.

Windows

  • The Windows SDK must be installed,providing the signtool.exe utility.
  • The following environment variable must be set:
    • PUP_SIGNING_IDENTITY:cname of the code signing certificate.

Behaviour Notes

In the first run,pup downloads one or more files,which are cached locally for later use:

  • A relocatable Python Runtime from thePython Build Standaloneproject.
  • On Windows,the WiX toolset,used to create MSI files.

pup logs its progress to STDERR,with fewer per-event details when it’s a TTY.The logging level defaults to INFO and can be changedwith either the --log-level CLI option,or by setting the PUP_LOG_LEVEL environment variable.

Other than the locally cached files,pup creates files under:

  • ./build/pup/ containing all intermediate artifacts..
  • ./dist/ where the final distributable artifact is delivered..

Packaging the Mu Editor on Windows

Requirements for signing:

  • The Windows SDK must be installed.
  • A code signing certificate must be available under Windows’ certmgr utility.

Run:

Where:

  • <signer> is the cname attribute of the code signing certificate.

Then, assuming the current working directory is Mu Editor’s repository root, run:

Note:

  • The command is line-wrapped for readability, but must be input as a single line.
  • One of the last packaging stages is signing.
  • It will take a while as there are many files to be signed,but progress is continuously displayed,with the defaul log level.

Once completed:

  • The resulting MSI file will be ./dist/Mu Editor <version>.msi.
  • A by-product of that is the ./build/pup/Mu Editor <version>/ relocatable directory,containing a GUI-clickable script that launches Mu.Creating a ZIP file from it for distributionresults in a minimally working “portable” Windows application.

Packaging the Mu Editor on macOS

Requirements for signing and notarization:

  • Must have XCode 10.3 or later installed.
  • Must have an Apple Developer Certificate –see this article’s step 4,for guidance.
  • Must create an Application Specific Password –see this article,for guidance.

Run:

Where:

  • <signer> is the 10-digit identifier on your Apple Developer Certificate’s cname.
  • <user> is the email address associated to you Apple Developer Account.
  • <asp> is the Application Specific Password.

Then, assuming the current working directory is Mu Editor’s repository root, run:

Install Pip Dmg Download

Note:

  • One of the last packaging stages is notarization.
  • It will take a while –no less than 3 minutes,IME,sometimes 10-15 minutes.
  • The logged messages should help understand that the “thing” is not hung.
  • Just be patient, I guess! :)

Once completed:

  • The resulting DMG file will be ./dist/<name><version>.dmg.
  • A by-product of that isthe ./build/pup/Mu Editor.app/ relocatable application bundle.Archiving it into a ZIP file, for distribution, should be perfectly fine.

More

Install

To learn more about puprefer to the online documentation:at this early stage,it is mostly a collectionof thoughts and ideasaround behaviour,requirements,and very very rough internal design.

Development moves forwardon GitHub at https://github.com/mu-editor/pup/.

Thanks

Install Pip Django

  • To Nicholas Tollervey, for the amazing Mu Editor.
  • To the Mu Editor contributorsI’ve been having the privilege of working more directly with,Carlos Pereira Atencio, Martin Dybdal, and Tim Golden, as well as the otherswhom I haven’t met yet but whose contributions I highly respect.
  • To Russell Keith-Magee, for the inspiring BeeWare projectand, in particular, for briefcase thatbeing used as the packaging tool for Mu on macOS as of this writing, serves as agreat inspiration to pup.
  • To Gregory Szorc, for the incrediblePython Standalone Buildsproject,on top of which pup packages redistributable Python GUI applications.
  • To Donald Stufft,for letting us pick up the pup name in PyPI.
  • To Glyph Lefkowitz, for the very useful,high quality Tips And Tricks for Shipping a PyGame App on the Macarticle,and for his generous hands-on involvement in the first-steps of pup’s takeon the subject in this issue.
  • To Alastair Houghton, for dmgbuild,that pup uses to create macOS DMG files.
  • To the WiX Toolset developers, maintainers,contributors, and sponsors:not sure how pup would go about building Windows MSI installers without it.

About

pup is in the process of being created by Tiago Montes,with the wonderful support of the Mu development team.

Release historyRelease notifications | RSS feed

1.0.0a10 pre-release

1.0.0a9 pre-release

Install Pip Dmg Free

1.0.0a8 pre-release

1.0.0a7 pre-release

1.0.0a6 pre-release

1.0.0a5 pre-release

Install Pip Windows

1.0.0a4 pre-release

1.0.0a3 pre-release

1.0.0a2 pre-release

1.0.0a1 pre-release

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pup, version 1.0.0a10
Filename, sizeFile typePython versionUpload dateHashes
Filename, size pup-1.0.0a10-py3-none-any.whl (37.9 kB) File type Wheel Python version py3 Upload dateHashes
Filename, size pup-1.0.0a10.tar.gz (33.8 kB) File type Source Python version None Upload dateHashes
Close

Install Pip Dmg Windows 10

Hashes for pup-1.0.0a10-py3-none-any.whl

Hashes for pup-1.0.0a10-py3-none-any.whl
AlgorithmHash digest
SHA25643ddbc9ca6345898b895448e8f682b93f93682e8ea60fe069affa132e430ee6f
MD5529ac32b8847c5654ea77c42ba65c61f
BLAKE2-25691cd1e0f871bfaa4860b124ee9aba505b71f365f8edfe45f98d6fe4701f1ed1d
Close

Hashes for pup-1.0.0a10.tar.gz

Install Python

Hashes for pup-1.0.0a10.tar.gz
AlgorithmHash digest
SHA256d0b20bc59f2cc30a23c024c825229a0791da7021de014f528ddbfbc954d3228f
MD580273ea2c7bb62222cfff0409b442779
BLAKE2-2567ed6661bf024b3504d5434c71e2e8e115e8804b49e1a7770e969bca2acebd16b