Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fix: Handle .zip files when generating Python packages" #2074

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hussainbani
Copy link

Title: Fix: Handle .zip Files When Generating Python Packages

Description:

This Pull Request addresses an issue where fpm fails to properly generate a package when the Python module is downloaded in .zip format via pip. Previously, fpm expected only .tar.gz archives and would throw an error when encountering a .zip file due to an unexpected directory layout.

Changes made:

  • Added logic to detect if the downloaded Python package is in .zip format.
  • Implemented functionality to properly extract .zip files using the unzip command and handle the packaging process as usual.
  • Maintained backward compatibility for .tar.gz files.

Testing:

  • Verified the fix by packaging Python modules provided in both .zip and .tar.gz formats.
  • Both archive types now process correctly, and the expected packages are generated without errors.

This PR resolves issue #2072, where users encountered a runtime error when pip fetched .zip files during the fpm packaging process.


Feel free to tweak the wording to better fit the specifics of your implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant