Hi Tim, On 11/25/2016 11:49 AM, Tim Graham wrote: > After doing releases about once a month for a while, I'm thinking it > would be nice if releasing Django could be a bit more automated. As far > as I know, the process hasn't changed too much in 10 years, while the > state of Python packaging has improved. > > Currently doing a release requires bumping the VERSION tuple in > django/__init__.py [0], creating tarball/wheel and checksum files, > asking someone in IRC to verify the checks look fine, and upload files > to various locations [1]. My idea would be to use setuptools_scm [2] > (that choice because this is the only tool I know about) to eliminate > the need to bump/set a VERSION tuple and instead fetch the version > information based on git tags. Something like (based on what I found in > djanog-hosts [3]): > > __version__ = pkg_resources.get_distribution('django').version
+1 for more automation, but I recommend simply automating the bumping of the hardcoded VERSION in the source tree (should not be hard to do). I recommend against relying on git for release versioning, and even more strongly against depending on pkg_resources to get the right version. It's just so much less robust and reliable than having a version hardcoded into the source tree. The above pkg_resources line only works if the current source tree is also installed in the current Python environment. If you are working in one source tree, but some other Django is installed, you will get the wrong version. If you are working in a source tree you haven't installed, you will get no version at all. We used to use a similar pkg_resources-based scheme in pip, and it caused no end of trouble. The git-based version fetching only works if you are working from a git repo, not an exported source tree. An exported source tree, independent of git, should still know at least what released version it represents. I am sure if we break this, it will break somebody's workflow. Carl -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7fc5a22c-bd8c-5c4e-0d8d-dee495837d81%40oddbird.net. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature