morgan

PyPI Mirror for Restricted/Offline Environments

APACHE-2.0 License

Downloads
239
Stars
105
Committers
4

Bot releases are hidden (Show)

morgan - Bugfix: mirroring will fail if no matched files found Latest Release

Published by ido50 about 1 year ago

morgan - Bugfix: mirroring can fail for some packages

Published by ido50 about 1 year ago

When filtering files of a package to mirror, Morgan checks whether the file's required Python version matches all environments. If a package defines its required version as a simple number instead of an actual specifier (e.g. '3' instead of the correct '==3'), then Morgan would fail when determining whether the file should be downloaded.

This release fixes the issue by forcing such files to have a valid specifier, and also ignoring files that still fail Morgan's verification.

morgan - Bugfix: downloaded files may not match all environments

Published by ido50 about 1 year ago

When Morgan mirrors packages, it chooses the most recent version that satisfies the requirement strings, and the environments. However, when matching environments, it would select files (and therefore version) that matches at least one of the Python versions of the environments, which could lead to Morgan choosing versions that do not support all of the Python versions.

This commit fixes this bug by requiring the selected versions match ALL of the Python versions defined in the environments. This could potentially lead to Morgan not finding matches at all, but this would be fixed in a subsequent release by treating each environment independently of the others.

morgan - Support any 1.x metadata version when mirroring

Published by ido50 over 1 year ago

This release updates Morgan's mirroring code to support any package metadata version in the 1.x family, not just 1.0.

morgan - Allow disabling serving of metadata files

Published by ido50 almost 2 years ago

The server will now accept a --no-metadata flag, which will disable serving of metadata files
when provided. This can be useful if installing packages via pip but not providing normalized
names (e.g. pip install FastAPI instead of pip install fastapi). This is to workaround an issue
with pip: when it is provided a non-normalized name, it sends it to the server normalized, but
expects the metadata file returned to have the non-normalized name. However, the server
cannot know what the non-normalized name is. The only way to work around this is to disable
serving of metadata files altogether.

morgan - Bugifx: decode request URLs before handling

Published by ido50 about 2 years ago

This release fixes a server issue with package distribution files that contain characters
that must be encoded in order to work inside a URL. The server will now properly
unescape the URL so such files can be downloaded.

Thanks to Imran Hossain for this release.

morgan - Fix pkg name retrieval in generate_reqs

Published by ido50 about 2 years ago

This version fixes the AttributeError: 'PathDistribution' object has no attribute 'name'
that may happen when running command morgan generate_reqs.

Thanks to Nikolai Gaiduchenko for this release.

morgan - Bugfix: manylinux wheels not downloaded

Published by ido50 about 2 years ago

Wheels marked as "manylinux" or "musllinux" were not downloaded to a typo in the relevant regular expression.

Thanks to Imran Hossain for this fix.

morgan - Move to Hatch, add metadata

Published by ido50 about 2 years ago

The project no longer uses Poetry for a project manager, and now uses
Hatch >=1.5.0. This allows the project to define metadata in
pyproject.toml in a standard way.

A lot of metadata is introduced. The version is no longer statically
defined in pyproject.toml, but dynamically defined in
morgan/about.py (variable version). A "version" command is added
to the Morgan command line, which simply prints the version and exits.

morgan - Bugfix: some setuptools dependencies may be missed

Published by ido50 about 2 years ago

Some dependencies define in a setuptools' requirements.txt file can be
missed and not mirrored if their are conditional on both an extra and
environment marker specifications.

morgan - Bugfix: file parsing failures could be detrimental

Published by ido50 about 2 years ago

This commit fixes two issues - both related to archive parsing failures

  • that could be fatal to the mirroring process or otherwise detrimental
    with the process:
  1. On Python versions prior to 3.10, failure to parse an archive could
    result in the process exiting instead of continuing with the next
    requirement.

  2. Failure to parse metadata file could result in the metadata file not
    being stored in the index.

Related code is also refactored for better maintenance and readability,
and the task of writing an archive's main METADATA file into the index
is relegated to the morgan.metadata module.

morgan - Improved and Independent Dependency Resolution

Published by ido50 about 2 years ago

This release implements independent dependency resolution for Morgan. Previous releases used pkginfo, which misses a lot of dependencies, as now described in the project's README file. This means Morgan is now capable to better resolve dependencies, and also ensure that build dependencies are included in the mirror (e.g. setuptools, hatch, etc.).

morgan - Generate Requirements from Current Environment

Published by ido50 about 2 years ago

This release adds the ability to generate a list of requirements for Morgan's
configuration file from the current environment, i.e. all packages that are
installed in sys.path. This functionality is provided via the generate_reqs
command, in a similar manner to generate_env.

Thanks to Nikolai Gaiduchenko for this new functionality.

morgan - First Public Release: v0.9.0

Published by ido50 about 2 years ago

First public release.