TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Python Wheels Crosses 90%

223 点作者 groodt将近 5 年前

18 条评论

haberman将近 5 年前
Today I spent at least an hour fighting with Python packaging. The more I think about it, the more I feel that self-contained static binaries are the way to go. Trying to load source files from all over the filesystem at runtime is hell. Or at least it&#x27;s hell to debug when it goes wrong.<p>I would love to see a move towards &quot;static&quot; binaries that package everything together into a single, self-contained unit.
评论 #23454101 未加载
评论 #23453157 未加载
评论 #23453431 未加载
评论 #23453789 未加载
评论 #23454740 未加载
评论 #23453969 未加载
评论 #23453140 未加载
评论 #23455862 未加载
评论 #23453380 未加载
评论 #23457276 未加载
评论 #23459245 未加载
评论 #23457283 未加载
评论 #23454164 未加载
评论 #23454112 未加载
评论 #23455140 未加载
评论 #23456609 未加载
评论 #23461527 未加载
评论 #23455740 未加载
评论 #23454188 未加载
u801e将近 5 年前
One thing I found when converting our python application packaging from RPM to wheels is that wheels don&#x27;t properly handle the data_files parameter in the setup call. That is, it places files under the python library directory instead of in the absolute path as specified. This means that sample configuration files and init scripts end up in the wrong place on the file system. In order to get around this, we had to upload the source distribution to our devpi instance and run pip install with the --no-binary option which would then place those files in the correct directories.<p>The other issue is that there&#x27;s no equivalent of the %(config) RPM spec directive to prevent the config file from being overwritten if it already exists on the file system.<p>So, for libraries, wheels are a good cross-platform packaging solution, but not so much for applications that require configuration files and init scripts.
评论 #23456017 未加载
评论 #23453075 未加载
评论 #23453209 未加载
评论 #23453996 未加载
评论 #23454039 未加载
评论 #23455092 未加载
navait将近 5 年前
I don’t know a lot about Python tooling, but in general my experiences with pip have been pleasant, so I appreciate all the work done by the maintainers to make it pleasant.
foldr将近 5 年前
Ah, so I&#x27;ve been confusing PyPI with PyPy. Someone made a great naming decision there.
评论 #23455392 未加载
评论 #23454361 未加载
schwag09将近 5 年前
At one point in time I created a Python package to highlight this benefit of wheels: &quot;Avoids arbitrary code execution for installation. (Avoids setup.py)&quot; - <a href="https:&#x2F;&#x2F;github.com&#x2F;mschwager&#x2F;0wned" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mschwager&#x2F;0wned</a><p>Of course Python imports can have side-effects, so you can achieve the same results with &#x27;import malicious_package&#x27;, but the installation avenue was surprising to me at the time so I created a simple demo. Also consider that &#x27;import malicious_package&#x27; is typically not run as root whereas &#x27;pip install&#x27; is often run with &#x27;sudo&#x27;.
评论 #23457114 未加载
downerending将近 5 年前
So far it&#x27;s just a bit of smoke on the horizon, but I&#x27;m noticing some packages abandoning &#x27;pip&#x27; installs entirely in favor of &#x27;conda&#x27;. It&#x27;s a bit early to tell if this trend will take off, but it does seem plausible.
评论 #23453191 未加载
评论 #23453686 未加载
评论 #23453312 未加载
评论 #23455083 未加载
评论 #23456678 未加载
groodt将近 5 年前
325 of top 360 Python packages are now distributed as Wheels.
thehiddenbrain将近 5 年前
For anyone working on python wheels requiring to compile c&#x2F;cpp&#x2F;fortran, this may be useful. See <a href="https:&#x2F;&#x2F;scikit-build.org" rel="nofollow">https:&#x2F;&#x2F;scikit-build.org</a><p>(Disclaimer: I am one of the maintainer)
评论 #23453369 未加载
usr1106将近 5 年前
That doesn&#x27;t seem to be a particular fast adoption. I remember seeing the first wheels when working at a job I quit early 2010. So it must be over 10 years.<p>Edit: A web search points to 2012, so maybe it&#x27;s &quot;only&quot; 8 years?<p>Edit 2: Pip came in 2008, so something changed somewhat before 2010 as I remembered. But what did it install if not wheels?
评论 #23454604 未加载
评论 #23454423 未加载
评论 #23454609 未加载
fortran77将近 5 年前
But snakes don&#x27;t have wheels. Why not call it &quot;skins?&quot;
评论 #23453117 未加载
jessaustin将近 5 年前
This seems like a really effective way to set up a page for shaming &quot;laggards&quot;. It would be interesting to track over time how many github issues are just links to this page.
评论 #23453612 未加载
dingdingdang将近 5 年前
Since pip is used to install Wheels it would probably be best to have a new separate 3rd party meta tool to install package managers themselves to avoid the confusion. Preferably this should have it&#x27;s own additional PEP and integrate PyPI and PyPy along with other packages that could make life simpler for the (hopefully now happier) end user.
awinter-py将近 5 年前
have always wondered why pypi doesn&#x27;t generate whl files for pure-python sdists<p>and why companies like travis &#x2F; github aren&#x27;t more active in language-level packaging work<p>github gives away so much free docker time -- faster installation would save them money directly
评论 #23453652 未加载
评论 #23456243 未加载
ciarannolan将近 5 年前
Could someone give a beginner&#x27;s tl;dr of wheels vs. eggs?<p>I use Python extensively but the &quot;Advantages of wheels&quot; section on this site is way over my head.<p>edit: Thanks everyone :)
评论 #23453053 未加载
评论 #23453041 未加载
评论 #23453034 未加载
评论 #23453029 未加载
fouc将近 5 年前
Is Python Wheels the equivalent of Ruby Gems? Or is it better?
评论 #23455257 未加载
dmix将近 5 年前
That’s a great way to track tech adoption within a community.
daveisfera将近 5 年前
Any news on supporting Alpine Linux with wheels?
arusahni将近 5 年前
Any idea if musl support is on the horizon?
评论 #23455855 未加载