{"id":229437,"date":"2020-12-12T07:59:28","date_gmt":"2020-12-11T23:59:28","guid":{"rendered":"http:\/\/4563.org\/?p=229437"},"modified":"2020-12-12T07:59:28","modified_gmt":"2020-12-11T23:59:28","slug":"pdm-1-0-0-beta-%e7%89%88%e5%8f%91%e5%b8%83%ef%bc%8c%e6%94%af%e6%8c%81%e6%9c%80%e6%96%b0-metadata-%e6%a0%87%e5%87%86-pep-621","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=229437","title":{"rendered":"pdm 1.0.0 beta \u7248\u53d1\u5e03\uff0c\u652f\u6301\u6700\u65b0 metadata \u6807\u51c6 PEP 621"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  pdm 1.0.0 beta \u7248\u53d1\u5e03\uff0c\u652f\u6301\u6700\u65b0 metadata \u6807\u51c6 PEP 621               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <span><i><\/i> 7<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5148\u795d\u5927\u5bb6\u5723\u8bde\u5feb\u4e50\u3002<\/p>\n<p>PDM \u521a\u521a\u4e5f\u53d1\u5e03\u4e86 1.0.0 beta \u7248\uff0c\u8ddd\u79bb\u4e0a\u6b21\u5728 V \u7ad9\u5ba3\u4f20 PDM\uff0c\u53c8\u591a\u4e86\u5f88\u591a\u597d\u7528\u7684\u529f\u80fd<\/p>\n<ol>\n<li>PEP 621 metadata \u6807\u51c6<\/li>\n<li>PEP 582 local package \u73b0\u5728 <strong>\u76f4\u63a5\u7528<\/strong> <code>python xxx.py<\/code>\u8fd0\u884c\u5c31\u80fd\u52a0\u8f7d\u9694\u79bb\u73af\u5883\u7684\u5305\u4e86\u3002<\/li>\n<li>\u652f\u6301\u5176\u4ed6\u4e3b\u6d41 metadata \u683c\u5f0f\u5bfc\u5165\uff1arequirements.txt\/Pipenv\/Poetry\/Flit<\/li>\n<li>Bash\/Zsh\/Fish\/PowerShell \u547d\u4ee4\u8865\u5168\uff0c\u652f\u6301 Windows \u4e00\u76f4\u662f\u9ad8\u4f18\u5148\u7ea7\uff0c\u56e0\u4e3a\u6211\u81ea\u5df1\u5c31\u7528\u7684\u662f Windows<\/li>\n<li>pdm scripts \u5feb\u6377\u8fd0\u884c\uff08\u7c7b\u4f3c package.json \u7684 scripts \uff09\uff0c\u652f\u6301\u73af\u5883\u53d8\u91cf\u52a0\u8f7d<\/li>\n<\/ol>\n<p>\u5173\u4e8e\u7b2c 2 \u6761\u6211\u5177\u4f53\u8bf4\u4e0b\u8fd9\u6709\u4ec0\u4e48\u597d\u5904\uff0c\u6bd4\u5982\u6211\u73b0\u5728\u8981\u5199\u4e00\u4e2a Flask \u5e94\u7528\uff0c\u53ea\u9700\u8981<\/p>\n<ol>\n<li><code>pdm add flask<\/code><\/li>\n<li>\u7f16\u5199<code>app.py<\/code><\/li>\n<li><code>python app.py<\/code><\/li>\n<\/ol>\n<p>\u6ca1\u6709 activate deactivate\uff0c\u76f4\u63a5\u542f\u52a8<\/p>\n<p>\u8fd9\u80fd\u505a\u4ec0\u4e48\u5462\uff1f\u6bd4\u5982\u6211\u5728 user site \u4e0b\u9762\u5b89\u88c5\u4e86\u4e00\u4e2a IPython\uff0c\u73b0\u5728\u6211\u4e0d\u7528\u5728\u6bcf\u4e2a\u73af\u5883\u91cc\u90fd\u88c5\u4e00\u4e2a IPython\uff0c\u53ea\u8981\u4fdd\u8bc1\u7528\u7684 Python \u7248\u672c\u662f\u4e00\u81f4\u7684\uff0c\u90a3\u6211\u5c31\u53ef\u4ee5\u5230\u5904\u7528\u8fd9\u4e2a IPython \u5bfc\u5165<code>__pypackages__<\/code>\u4e2d\u7684\u5305\u505a\u8c03\u8bd5\u4e86\u3002\uff08\u53ea\u662f\u4e3e\u4e2a\u4f8b\u5b50\uff0cIPython \u80fd\u81ea\u52a8\u63a2\u6d4b\u5904\u4e8e venv \u4e2d\u5e76\u52a0\u8f7d\u5305\u8def\u5f84\uff0c\u4f46\u8fd8\u6709\u5f88\u591a\u5176\u4ed6\u7684\u547d\u4ee4\u884c\u5de5\u5177\u662f\u6ca1\u529e\u6cd5\u8fd9\u6837\u7684\uff09<\/p>\n<p>\u662f\u7684\u6ca1\u9519\uff0cvenv \u5176\u5b9e\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e2a\u6548\u679c\uff0c\u4e0d\u8fc7\u5c31\u662f\u5728\u521b\u5efa\u7684\u65f6\u5019\u52a0\u4e0a<code>--site-packages<\/code>\u9009\u9879\u561b\uff0c\u4f46\u5df2\u7ecf\u521b\u5efa\u597d\u7684\u5462\uff0c\u4f30\u8ba1\u4e0d\u662f\u6240\u6709\u4eba\u90fd\u77e5\u9053\u53bb\u6539\u90a3\u4e2a<code>pyvenv.cfg<\/code>\u3002\u4f55\u51b5\u59cb\u7ec8\u8981\u8bb0\u5f97 activate \u624d\u80fd\u542f\u7528 venv \u4e2d\u7684\u5305\u3002<\/p>\n<p>\u4f46 PDM \u6700\u5927\u7684\u4e00\u4e2a\u7f3a\u9677\u662f(\u522b\u55b7\uff0c\u6211\u81ea\u5df1\u62db\uff0c\u54c8\u54c8)\uff1aIDE \u7684\u652f\u6301\uff0c\u6bcf\u6b21\u521b\u5efa\u65b0\u9879\u76ee\uff0c\u90fd\u9700\u8981\u8fdb\u884c\u624b\u52a8\u914d\u7f6e\u624d\u80fd\u4f7f\u7528<code>__pypackages__<\/code>\u4e2d\u7684\u5305\u3002<\/p>\n<ul>\n<li>PyPI: https:\/\/pypi.org\/project\/pdm\/1.0.0b0\/<\/li>\n<li>GitHub: https:\/\/github.com\/frostming\/pdm<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4704506\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abersheeran <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u66f4\u65b0\u662f\u771f\u7684\u4e0d\u9519\u3002\u540e\u7eed\u7248\u672c\u8003\u8651\u505a\u4e00\u4e0b PyPi \u53d1\u5e03\u652f\u6301\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4704507\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @abersheeran \u6211\u4e00\u76f4\u5728\u72b9\u8c6b\uff0c\u662f\u8981\u5168\u90e8\u4e00\u628a\u6293\uff0c\u8fd8\u662f keep it simple\uff0c\u8ba9\u4e13\u4e1a\u7684\u4eba\uff08 twine \uff09\u505a\u4e13\u4e1a\u7684\u4e8b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4704508\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abersheeran <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @frostming \u4e5f\u662f\u3002\u4fdd\u7559\u7b80\u5355\u6700\u597d\u3002\u6587\u6863\u91cc\u53ef\u4ee5\u8ddf twine \u90a3\u8fb9\u505a\u4e2a\u8054\u52a8\uff0c\u7b80\u5355\u7684\u7ed9\u4e2a\u6837\u4f8b\u6559\u4e00\u4e0b\u5982\u4f55\u4f7f\u7528 pdm \u7ba1\u7406\u9879\u76ee\uff0c\u7528 twine \u53d1\u5e03\u9879\u76ee\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4704509\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : abersheeran <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @frostming build whl \u7684\u529f\u80fd\u80af\u5b9a\u5f97\u6709\u2026\u2026\u4e0d\u7136\u7528\u4e86\u4f60\u8fd9\u4e2a\u7ba1\u7406\u4f9d\u8d56\uff0c\u8fd8\u5f97\u5199\u4e00\u4efd setup.py \u592a\u5197\u4f59\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4704510\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @abersheeran \u6539\u8fdb\u6587\u6863\u53ef\u4ee5\u6709<\/p>\n<p>#4 pdm build \u5c31\u662f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>pdm 1.0.0 beta \u7248\u53d1&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/229437"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=229437"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/229437\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229437"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}