On Fri, Nov 25, 2016 at 8:49 PM, Tim Graham <timogra...@gmail.com> 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
>
Oh, this will never work with my setup (*.dist-info are not saved).
It is always really needed the *.dist-info metadata?
Need to check this...

(just tried a sample and I can't use django-hosts for this...
pkg_resources.DistributionNotFound: The 'django-hosts' distribution was not
found and is required by the application
not nice)


One issue I'm not sure how to deal with is how to provides
> backwards-compatibility for django.VERSION, the tuple format that looks
> something like:
>
> VERSION = (1, 11, 0, 'alpha', 0)
>
> I think removing or deprecating it would be quite disruptive for the
> community as I've seen lots of third-party apps that do checks like "if
> django.VERSION < (1, 9): ...", for example. I suspect it's possible to
> parse the version string to create something similar, but I wondered if
> anyone has experience with that.
>
if tuple(map(int,
pkg_resources.get_distribution('django').version.split('.')[:2])) < (1, 11):
    ...
and this doesn't work for '1.10a0'

-- 
| Raffaele Salmaso
| https://salmaso.org
| https://bitbucket.org/rsalmaso
| https://github.com/rsalmaso

-- 
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/CABgH4JvzUnfSF8baMG1T%2BJS%2BwsZwM60QBa0X46xXFdtRKffGyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to