meta_package_manager.managers.apm module¶
- class meta_package_manager.managers.apm.APM[source]¶
Bases:
PackageManagerAtom’s package manager, from the sunset Atom editor.
apm installed packages and themes for GitHub’s Atom editor, exposing an npm-style CLI whose queries mpm parses from
--jsonoutput.Atom was sunset on December 15, 2022, so apm is flagged unmaintained here. mpm keeps the wrapper while doing so stays cheap: the community fork atom-community/apm has been floated but never produced a usable drop-in, and per the project’s stability policy an unmaintained manager may be dropped without notice once it becomes a burden to maintain.
Initialize
cli_errorslist.- unmaintained: bool = True¶
A manager whose upstream project is no longer maintained.
Covers projects that are officially retired and those we infer are abandoned: archived on their forge, left without a release or commit for years, formally superseded by a successor, or part of a discontinued platform. See the stability policy in
CLAUDE.mdfor the full criteria.An unmaintained manager is hidden from package selection by default (you can still use it by explicitly calling for it on the command line), and is exempt from the project stability policy: it may be dropped, in part or in full, in any release and without notice, once keeping it working becomes too burdensome.
Unmaintained managers are kept out of the functional and integration test matrices, so an unreliable or flaky one never blocks a release and we save CI resources. The commitment is to keep the wrapper for as long as that stays cheap: the cheap static invariants (ID format, attribute ordering, …) still apply for as long as the manager’s code lives in the source tree, to keep that code valid.
Every unmaintained manager must document itself through
unmaintained_message.
- unmaintained_message: str | None = 'Atom was [sunset on 2022-12-15](https://github.blog/2022-06-08-sunsetting-atom/); `apm` is archived and no community fork (such as [atom-community/apm](https://github.com/atom-community/apm)) has produced a usable drop-in.'¶
Evidence and rationale for the
unmaintainedflag, as a MyST markdown block.Rendered into the documentation (the manager’s page, and a
⚠️marker in the manager tables). May embed markdown links to the archival notice, the successor project, or the discontinuation announcement. Required for every manager whoseunmaintainedflag is set, and only meaningful on such managers. Enforced bytest_unmaintained.
- name: str = 'Atom apm'¶
Return package manager’s common name.
Default value is based on class name.
- homepage_url: str | None = 'https://atom.io/packages'¶
Home page of the project, only used in documentation for reference.
- platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='freebsd', name='FreeBSD'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='macos', name='macOS'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='midnightbsd', name='MidnightBSD'), Platform(id='netbsd', name='NetBSD'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='openbsd', name='OpenBSD'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='sunos', name='SunOS'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})¶
List of platforms supported by the manager.
Allows for a mishmash of platforms and groups of platforms. Will be normalized into a
frozensetofPlatforminstances at instantiation.
- requirement: str | None = '>=1.0.0'¶
Version requirement specifier.
Supports a comma-separated range of constraints (e.g.
">=1.20.0,<2.0.0"). A bare version string like"1.20.0"is treated as>=1.20.0.Parsed by
meta_package_manager.version.VersionRange.Defaults to
None, which deactivates version check entirely.
- version_regexes: tuple[str, ...] = ('apm\\s+(?P<version>\\S+)',)¶
$ apm --version apm 2.6.2 npm 6.14.13 node 12.14.1 x64 atom 1.58.0 python 2.7.16 git 2.33.0
- property installed: Iterator[Package]¶
Fetch installed packages.
$ apm list --json { "core": [ { "name": "background-tips", "version": "0.26.1", "description": "Displays tips about Atom in the background." } ], "user": [ { "name": "file-icons", "version": "2.0.9", "description": "Assign file extension icons" } ] }
- property outdated: Iterator[Package]¶
Fetch outdated packages.
$ apm outdated --compatible --json [ { "name": "file-icons", "version": "2.0.9", "latestVersion": "2.0.10", "description": "Assign file extension icons" } ]
- search(query, extended, exact)[source]¶
Fetch matching packages.
Caution
Search does not supports exact matching.
$ apm search --json python | jq [ { "name": "atom-python-run", "main": "./lib/atom-python-run.js", "version": "0.7.3", "description": "Run a python source file.", "keywords": [ "python" ], "repository": "https://github.com/foreshadow/atom-python-run", "license": "MIT", "engines": { "atom": ">=1.0.0 <2.0.0" }, "dependencies": {}, "readme": "Blah blah", "downloads": 41379, "stargazers_count": 16 }, { "name": "build-python", "version": "0.6.3", "description": "Atom Build provider for python/python3", "repository": "https://github.com/idleberg/atom-build-python", "license": "MIT", "keywords": [ "buildprovider", "compile", "python", "python3", "linter", "lint" ], "main": "lib/provider.js", "engines": { "atom": ">=1.0.0 <2.0.0" }, "providedServices": { "builder": { "description": "Compiles Python", "versions": { "2.0.0": "provideBuilder" } } }, "package-deps": [ "build" ], "dependencies": { "atom-package-deps": "^4.3.1" }, "devDependencies": { "babel-eslint": "^7.1.1", "coffeelint-stylish": "^0.1.2", "eslint": "^3.13.1", "eslint-config-atom-build": "^4.0.0", "gulp": "github:gulpjs/gulp#4.0", "gulp-coffeelint": "^0.6.0", "gulp-debug": "^3.0.0", "gulp-jshint": "^2.0.4", "gulp-jsonlint": "^1.2.0", "gulp-lesshint": "^2.1.0", "jshint": "^2.9.4" }, "scripts": { "test": "gulp lint" }, "readme": "Blah blah", "downloads": 2838, "stargazers_count": 0 }, (...) ]
$ apm search --no-description --json python | jq
- install(package_id, version=None)[source]¶
Install one package.
$ apm install image-view The image-view package is bundled with Atom and should not be explicitly installed. You can run ``apm uninstall image-view`` to uninstall it and then the version bundled with Atom will be used. Installing image-view to /Users/kde/.atom/packages âś“
- Return type:
- upgrade_all_cli()[source]¶
Generates the CLI to upgrade all outdated packages.
$ apm update --no-confirm
- upgrade_one_cli(package_id, version=None)[source]¶
Generates the CLI to upgrade the provided package.
$ apm update --no-confirm image-view
- cli_names: tuple[str, ...] = ('apm',)¶
List of CLI names the package manager is known as.
This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.
- ..hint::
This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named
pythonorpython3.
By default, this property’s value is derived from the manager’s ID (see the
MetaPackageManager.__init__method above).