mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 15:19:04 +00:00
1 line
5.5 KiB
JSON
1 line
5.5 KiB
JSON
{"pageProps":{"metadata":{"date":"2021-12-21 17:31:18 +08:00","date_modified":"2022-06-21 12:05:30 +08:00>","language":"en","source":""},"title":"Python Packaging: Why don't you just?","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"the-state-of-python-packaging"},"children":[{"type":"text","value":"The state of Python packaging"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.chungPythonPackagingWhy2021#the-state-of-python-packaging"},"children":[{"type":"text","value":"The state of Python packaging"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"the-answer-to-the-question"},"children":[{"type":"text","value":"The answer to the question"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.chungPythonPackagingWhy2021#the-answer-to-the-question"},"children":[{"type":"text","value":"The answer to the question"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":":properties:\n:id: 2ba59995-1fc7-46a7-aa0b-cceca4134a7f\n:roam"},{"type":"element","tagName":"sub","properties":{},"children":[{"type":"text","value":"refs"}]},{"type":"text","value":": ["},{"type":"element","tagName":"a","properties":{"href":"cite:@chungPythonPackagingWhy2021"},"children":[{"type":"text","value":"cite:@chungPythonPackagingWhy2021"}]},{"type":"text","value":"]\n:end:\n"}]},{"type":"element","tagName":"h1","properties":{"id":"the-state-of-python-packaging"},"children":[{"type":"text","value":"The state of Python packaging"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Python predates the common packaging ecosystem we all interact today thus it has some artifacts from history\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"back in the day, for someone to use a dependency, they have to download the source;\n in Python's case, they chose with the most common way to download a file: simple tarballs\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"as more platforms grow and being supported, there are more incentives to make delivering dependencies faster but each output may contain different metadata;\n this results in big packages to "},{"type":"element","tagName":"a","properties":{"href":"https://pypi.org/project/Pillow/#files"},"children":[{"type":"text","value":"create huge lists of possible outputs"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"for the package manager to know the metadata, it has to download the whole package and run the build script\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"however, this simplicity also brings advantage that you can simply create a Python package repository by simply building the wheels and dropping them along with the source in a directory\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"another artifact to consider is Python supports a lot of platforms;\n it is considered supported when Python is confirmed to run on a platform;\n it cannot support building all wheels for all platforms so at some point when doing a "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"pip install"}]},{"type":"text","value":" of a big package, it has to build the package from source\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"metadata are just placed in files which is a good thing since they can be placed next to the sources\n"}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"the-answer-to-the-question"},"children":[{"type":"text","value":"The answer to the question"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"third system effect;\n the first few efforts went well but some people want to create a better system with more ambitious goals and a grander vision;\n except it didn't work out and the attempts will inspire another group to try a better version\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"the quick succession of attempts at standardizing Python packaging fragmented the packaging process by offering multiple ways to do the goal;\n as more attempts have made, there's lesser central driving force\n"}]}]}]}]},"backlinks":[]},"__N_SSG":true} |