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

fetch: add pypi backend #32

Merged
merged 2 commits into from
Oct 18, 2024
Merged

fetch: add pypi backend #32

merged 2 commits into from
Oct 18, 2024

Conversation

stdmnpkg
Copy link
Contributor

find source code url for pypi package is not trivial, so i automated it.

Copy link

what-the-diff bot commented Oct 17, 2024

PR Summary

  • Improved Download Handling:
    • The tarball_fetch function which is used to download information has been enhanced. The direct calls to a command-line tool wget were replaced with a developed wget_download helper function that simplifies the download process. We also added error handling measures for when downloads fail, ensuring the system can react accordingly.
  • New Downloading Function:
    • A new function called wget_download was added. It's a more organized way to handle downloads using the wget command-line tool, preventing the overwriting of already downloaded files.
  • Development of PyPI Package Fetching:
    • There's a new pypi_fetch function that fetches packages from PyPI, the Python Package Index, through the use of PyPI's API. It obtains the source URL of a package and identifies how the package has been compressed.
  • Expanded Object Handling:
    • The source processing methods, grouped together in the processes mapping, have been expanded to support 'PYPI' as a source, connecting to the newly created pypi_fetch function.
  • Enhanced Function Parsing:
    • An update was made to the parse_fetch_options function that allows it to parse for 'version' and set it to a specific value. This is an addition to the pre-existing ability to parse for 'commit'.

@stdmnpkg
Copy link
Contributor Author

usage:

SRCS="pypi::version=$VER::$PKGNAME"

for example:

SRCS="pypi::version=3.0.3::flask"

@MingcongBai MingcongBai marked this pull request as ready for review October 18, 2024 01:57
@MingcongBai MingcongBai merged commit fe56ef7 into production Oct 18, 2024
1 check passed
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.

2 participants