Open2

python beautifulsoup4 (Custom AWS Lambda Layer)

marchanmarchan

beautifulsoup4 ダウンロード

$ cd python
$ pwd
/home/ec2-user/environment/install-python/python
$ pip3 install beautifulsoup4 -t .

Collecting beautifulsoup4
Downloading beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting soupsieve>1.2 (from beautifulsoup4)
Downloading soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
Downloading beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 147.9/147.9 kB 5.7 MB/s eta 0:00:00
Downloading soupsieve-2.5-py3-none-any.whl (36 kB)
Installing collected packages: soupsieve, beautifulsoup4
Successfully installed beautifulsoup4-4.12.3 soupsieve-2.5

$ cd ..
$ zip -r python_layer.zip python/

adding: python/ (stored 0%)
adding: python/beautifulsoup4-4.12.3.dist-info/ (stored 0%)
adding: python/beautifulsoup4-4.12.3.dist-info/RECORD (deflated 59%)
adding: python/beautifulsoup4-4.12.3.dist-info/REQUESTED (stored 0%)
adding: python/beautifulsoup4-4.12.3.dist-info/INSTALLER (stored 0%)
adding: python/beautifulsoup4-4.12.3.dist-info/licenses/ (stored 0%)
adding: python/beautifulsoup4-4.12.3.dist-info/licenses/LICENSE (deflated 46%)
adding: python/beautifulsoup4-4.12.3.dist-info/licenses/AUTHORS (deflated 43%)
adding: python/beautifulsoup4-4.12.3.dist-info/WHEEL (deflated 2%)
adding: python/beautifulsoup4-4.12.3.dist-info/METADATA (deflated 57%)
adding: python/bs4/ (stored 0%)
adding: python/bs4/pycache/ (stored 0%)
adding: python/bs4/pycache/formatter.cpython-39.pyc (deflated 56%)
adding: python/bs4/pycache/element.cpython-39.pyc (deflated 65%)
adding: python/bs4/pycache/diagnose.cpython-39.pyc (deflated 52%)
adding: python/bs4/pycache/dammit.cpython-39.pyc (deflated 58%)
adding: python/bs4/pycache/css.cpython-39.pyc (deflated 73%)
adding: python/bs4/pycache/init.cpython-39.pyc (deflated 56%)
adding: python/bs4/tests/ (stored 0%)
adding: python/bs4/tests/pycache/ (stored 0%)
adding: python/bs4/tests/pycache/test_tree.cpython-39.pyc (deflated 69%)
adding: python/bs4/tests/pycache/test_tag.cpython-39.pyc (deflated 61%)
adding: python/bs4/tests/pycache/test_soup.cpython-39.pyc (deflated 63%)
adding: python/bs4/tests/pycache/test_pageelement.cpython-39.pyc (deflated 64%)
adding: python/bs4/tests/pycache/test_navigablestring.cpython-39.pyc (deflated 53%)
adding: python/bs4/tests/pycache/test_lxml.cpython-39.pyc (deflated 56%)
adding: python/bs4/tests/pycache/test_htmlparser.cpython-39.pyc (deflated 51%)
adding: python/bs4/tests/pycache/test_html5lib.cpython-39.pyc (deflated 57%)
adding: python/bs4/tests/pycache/test_fuzz.cpython-39.pyc (deflated 53%)
adding: python/bs4/tests/pycache/test_formatter.cpython-39.pyc (deflated 51%)
adding: python/bs4/tests/pycache/test_element.cpython-39.pyc (deflated 56%)
adding: python/bs4/tests/pycache/test_docs.cpython-39.pyc (deflated 21%)
adding: python/bs4/tests/pycache/test_dammit.cpython-39.pyc (deflated 61%)
adding: python/bs4/tests/pycache/test_css.cpython-39.pyc (deflated 66%)
adding: python/bs4/tests/pycache/test_builder_registry.cpython-39.pyc (deflated 59%)
adding: python/bs4/tests/pycache/test_builder.cpython-39.pyc (deflated 41%)
adding: python/bs4/tests/pycache/init.cpython-39.pyc (deflated 69%)
adding: python/bs4/tests/fuzz/ (stored 0%)
adding: python/bs4/tests/fuzz/crash-ffbdfa8a2b26f13537b68d3794b0478a4090ee4a.testcase (deflated 42%)
adding: python/bs4/tests/fuzz/crash-0d306a50c8ed8bcd0785b67000fcd5dea1d33f08.testcase (deflated 72%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-6600557255327744.testcase (deflated 26%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-6450958476902400.testcase (deflated 99%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-6306874195312640.testcase (deflated 30%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-6241471367348224.testcase (stored 0%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-6124268085182464.testcase (deflated 99%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5984173902397440.testcase (deflated 97%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5843991618256896.testcase (deflated 34%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5703933063462912.testcase (stored 0%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5492400320282624.testcase (deflated 93%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5375146639360000.testcase (deflated 98%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5270998950477824.testcase (stored 0%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5167584867909632.testcase (deflated 97%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-5000587759190016.testcase (deflated 95%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-4999465949331456.testcase (deflated 23%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-4818336571064320.testcase (stored 0%)
adding: python/bs4/tests/fuzz/clusterfuzz-testcase-minimized-bs4_fuzzer-4670634698080256.testcase (deflated 7%)
adding: python/bs4/tests/test_tree.py (deflated 79%)
adding: python/bs4/tests/test_tag.py (deflated 70%)
adding: python/bs4/tests/test_soup.py (deflated 73%)
adding: python/bs4/tests/test_pageelement.py (deflated 73%)
adding: python/bs4/tests/test_navigablestring.py (deflated 68%)
adding: python/bs4/tests/test_lxml.py (deflated 71%)
adding: python/bs4/tests/test_htmlparser.py (deflated 65%)
adding: python/bs4/tests/test_html5lib.py (deflated 69%)
adding: python/bs4/tests/test_fuzz.py (deflated 68%)
adding: python/bs4/tests/test_formatter.py (deflated 69%)
adding: python/bs4/tests/test_element.py (deflated 71%)
adding: python/bs4/tests/test_docs.py (deflated 51%)
adding: python/bs4/tests/test_dammit.py (deflated 70%)
adding: python/bs4/tests/test_css.py (deflated 77%)
adding: python/bs4/tests/test_builder_registry.py (deflated 74%)
adding: python/bs4/tests/test_builder.py (deflated 60%)
adding: python/bs4/tests/init.py (deflated 75%)
adding: python/bs4/builder/ (stored 0%)
adding: python/bs4/builder/pycache/ (stored 0%)
adding: python/bs4/builder/pycache/_lxml.cpython-39.pyc (deflated 51%)
adding: python/bs4/builder/pycache/_htmlparser.cpython-39.pyc (deflated 55%)
adding: python/bs4/builder/pycache/_html5lib.cpython-39.pyc (deflated 53%)
adding: python/bs4/builder/pycache/init.cpython-39.pyc (deflated 57%)
adding: python/bs4/builder/_lxml.py (deflated 69%)
adding: python/bs4/builder/_htmlparser.py (deflated 69%)
adding: python/bs4/builder/_html5lib.py (deflated 74%)
adding: python/bs4/builder/init.py (deflated 68%)
adding: python/bs4/formatter.py (deflated 69%)
adding: python/bs4/element.py (deflated 77%)
adding: python/bs4/diagnose.py (deflated 67%)
adding: python/bs4/dammit.py (deflated 73%)
adding: python/bs4/css.py (deflated 81%)
adding: python/bs4/init.py (deflated 72%)
adding: python/soupsieve-2.5.dist-info/ (stored 0%)
adding: python/soupsieve-2.5.dist-info/RECORD (deflated 50%)
adding: python/soupsieve-2.5.dist-info/INSTALLER (stored 0%)
adding: python/soupsieve-2.5.dist-info/licenses/ (stored 0%)
adding: python/soupsieve-2.5.dist-info/licenses/LICENSE.md (deflated 41%)
adding: python/soupsieve-2.5.dist-info/WHEEL (deflated 1%)
adding: python/soupsieve-2.5.dist-info/METADATA (deflated 60%)
adding: python/soupsieve/ (stored 0%)
adding: python/soupsieve/pycache/ (stored 0%)
adding: python/soupsieve/pycache/util.cpython-39.pyc (deflated 40%)
adding: python/soupsieve/pycache/pretty.cpython-39.pyc (deflated 55%)
adding: python/soupsieve/pycache/css_types.cpython-39.pyc (deflated 62%)
adding: python/soupsieve/pycache/css_parser.cpython-39.pyc (deflated 53%)
adding: python/soupsieve/pycache/css_match.cpython-39.pyc (deflated 56%)
adding: python/soupsieve/pycache/meta.cpython-39.pyc (deflated 53%)
adding: python/soupsieve/pycache/init.cpython-39.pyc (deflated 49%)
adding: python/soupsieve/util.py (deflated 61%)
adding: python/soupsieve/py.typed (stored 0%)
adding: python/soupsieve/pretty.py (deflated 68%)
adding: python/soupsieve/css_types.py (deflated 78%)
adding: python/soupsieve/css_parser.py (deflated 77%)
adding: python/soupsieve/css_match.py (deflated 78%)
adding: python/soupsieve/meta.py (deflated 68%)
adding: python/soupsieve/init.py (deflated 68%)

$ ls
python  python_layer.zip
$ ls -l

total 392
drwxr-xr-x. 6 ec2-user ec2-user 104 Apr 22 02:31 python
-rw-r--r--. 1 ec2-user ec2-user 398166 Apr 22 02:33 python_layer.zip