On Tue, Aug 30, 2016 at 4:06 PM Donald Stufft <don...@stufft.io> wrote:
> > On Aug 30, 2016, at 2:32 PM, Daniel Holth <dho...@gmail.com> wrote: > > name, version, packages, install_requires, extras_require, description, > license, classifiers, keywords, author, url, entry_points. > > > 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”. > > 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. > Of course pip continues to call egg_info before trusting the metadata from any sdist and 90k pypi projects say this isn't changing. Once you need dynamic static metadata, madness. 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.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig