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

use pypi.io url instead of api, support update checksum for pypi, add doc #33

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

stdmnpkg
Copy link
Contributor

No description provided.

Copy link

what-the-diff bot commented Oct 18, 2024

PR Summary

  • Improved Flexibility in Checksum Calculation
    The calculate_checksum function has been updated to now include 'pypi' types in its processing list. This enhancement extends its ability to handle PyPI packages, thus making the tool more versatile.

  • Enhanced Documentation in appendix.rst

    • The section about "Acceptable Prefixes for SRCS" has been reformatted. The new structure is easier to understand, making it more user-friendly.
    • A new addition was made in the table namely pypi. It stands for "PyPI Package Source Code (Remote Files)". However, it's important to note that auto-deduction functionality does not apply to this prefix.

@stdmnpkg stdmnpkg marked this pull request as ready for review October 21, 2024 13:38
@stdmnpkg stdmnpkg changed the title support update checksum for pypi, also add doc use pypi.io url instead of api, support update checksum for pypi, add doc Oct 23, 2024
@MingcongBai
Copy link
Member

The switch to URL concatenation sounds good to me, as this is usually a fairly safe choice and much simpler than playing with API.

@stdmnpkg
Copy link
Contributor Author

tested with AOSC-Dev/aosc-os-abbs#8352

studentmain@MeowPC3E [ acbs@pypi-doc-chksum ] $  cd /home/studentmain/Documents/acbs ; /usr/bin/env /bin/python3 /home/studentmain/.vscode/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 44407 -- acbs-build -gwdc -l /tmp/acbs/dump -o /tmp/acbs/log -z /tmp/acbs/temp -b /home/studentmain/Documents/ciel/TREE random2 
Build directory clean, no need to clear...
---------------------------------------------------------------------------------- Welcome to ACBS - 20241018 ----------------------------------------------------------------------------------
[INFO]: Searching and resolving dependencies...
[DEBUG]: Finding random2...
[DEBUG]: Parsing /home/studentmain/Documents/ciel/TREE/lang-python/random2/autobuild...
[DEBUG]: Checking if python-3 is installed
[DEBUG]: Checking if setuptools is installed
[DEBUG]: Filtering packages...
[DEBUG]: Converting queue into adjacency graph...
[DEBUG]: Running Tarjan search...
[1/1] random2                       
[INFO]: Dependencies resolved, 1 packages in the queue
[DEBUG]: Queue: [<ACBSPackageInfo random2: deps: [] ; uri: [<ACBSSourceInfo pypi: random2:[email protected] integrity: ('sha256', '3754fcef48267567cd5705fa7da6bbc3809cb3f808740313e6705acc3c057e77')>]>]
[INFO]: Packages to be built: random2
[INFO]: Building random2 (1/1)...
[INFO]: Fetching required source files...
[INFO]: Fetching source (1/1)...
--2024-10-23 15:32:58--  https://pypi.io/packages/source/r/random2/random2-1.0.2.tar.gz
Resolving pypi.io (pypi.io)... 151.101.128.223, 151.101.0.223, 151.101.192.223, ...
Connecting to pypi.io (pypi.io)|151.101.128.223|:443... connected.
HTTP request sent, awaiting response... 301 Redirect to Primary Domain
Location: https://pypi.org/packages/source/r/random2/random2-1.0.2.tar.gz [following]
--2024-10-23 15:32:59--  https://pypi.org/packages/source/r/random2/random2-1.0.2.tar.gz
Resolving pypi.org (pypi.org)... 151.101.128.223, 151.101.0.223, 151.101.192.223, ...
Connecting to pypi.org (pypi.org)|151.101.128.223|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://files.pythonhosted.org/packages/source/r/random2/random2-1.0.2.tar.gz [following]
--2024-10-23 15:33:00--  https://files.pythonhosted.org/packages/source/r/random2/random2-1.0.2.tar.gz
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.108.223, 2a04:4e42:1a::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.108.223|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://files.pythonhosted.org/packages/c2/f8/aba7ea7900492da2dd405aa42aa6160b83490421c7d70cf2d5aa44238a13/random2-1.0.2.tar.gz [following]
--2024-10-23 15:33:01--  https://files.pythonhosted.org/packages/c2/f8/aba7ea7900492da2dd405aa42aa6160b83490421c7d70cf2d5aa44238a13/random2-1.0.2.tar.gz
Reusing existing connection to files.pythonhosted.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 18095 (18K) [application/octet-stream]
Saving to: ‘/tmp/acbs/dump/e1b74f6357dbdd0e03ad26afaab04071964ef1c9a0f0abf10edb060e06c890a0.tar.gz’

/tmp/acbs/dump/e1b74f6357dbdd0e03ad26afaab04071 100%[=======================================================================================================>]  17.67K  58.8KB/s    in 0.3s    

2024-10-23 15:33:02 (58.8 KB/s) - ‘/tmp/acbs/dump/e1b74f6357dbdd0e03ad26afaab04071964ef1c9a0f0abf10edb060e06c890a0.tar.gz’ saved [18095/18095]

[INFO]: Updated checksum for random2

========================================
    ACBS Build Successful
========================================

Package(s) built:
random2         Download only

@stdmnpkg stdmnpkg merged commit f781a57 into production Oct 23, 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