<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Aug 30, 2016 at 4:06 PM Donald Stufft <<a href="mailto:donald@stufft.io">donald@stufft.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Aug 30, 2016, at 2:32 PM, Daniel Holth <<a href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">name, version, packages, install_requires, extras_require, description, license, classifiers, keywords, author, url, entry_points.<span> </span></span></div></blockquote></div><br></div><div style="word-wrap:break-word"><div>Out of these, a number of them are regularly dynamic for people’s setup.py as is. The version number is often dynamically computed based on things like git tags, packages can be computed based on Python version, install_requires and extras_requires regularly get computed based on things like Python version, OS, etc (although environment markers eases some of this) but also things like “We support Numpy >= for building from source, but once you’ve built from source you only support Numpy >= VERSION_YOU_BUILT_AGAINST”.</div><div><br></div><div>Outside of “name”, it’s not entirely unreasonable to find reasons why a lot of things need to be dynamic. Although there’s a difference in what needs to be dynamic when pulling from a VCS and when pulling from a sdist, and currently there’s not really a whole lot of difference in terms of capability or how they are handled.</div></div></blockquote><div><br></div><div>Of course pip continues to call egg_info before trusting the metadata from any sdist and 90k pypi projects say this isn't changing. <span style="line-height:1.5">Once you need dynamic static metadata, madness.</span></div><div><br></div><div>In other systems I've worked on I sometimes have make-like rules that automatically rebuild static metadata depending on other files, like copying a version number between a .json and an .xml file - reprogramming the system that uses the .xml file is not an option. For example a rule could watch certain files in the .git directory to regenerate a version number automatically as part of the build if .git changed, and do nothing if the .git directory was absent per a tarball dist. This works pretty well. Once you have a system that's easy to customize with make-like rules there are all sorts of trivial build or housekeeping tasks you might decide to do which would never be considered in a more difficult to customize system.</div></div></div>