I suggest uWSGI will return this tuple itself, similar to Python's sys
module .version and .version_info.

Also, I suggest it will be possible to give a custom string to uWSGI's build
script, and this custom string will appear in both .version and
.version_info.

Just my $0.02,
 - Yaniv

2011/6/1 Łukasz Wróblewski <[email protected]>

> To easily check if my application is using the correct uWSGI version:
>
> def version_info():
>    return tuple(map(int,
> uwsgi.version.decode().replace('-','.').split('.')[:3]))
>
>
> Example of use:
>
> if version_info() < (0,9,8):
>   raise Exception('req min uWSGI 0.9.8')
>
>
> Maybe this can be included in module as uwsgi.version_info
> and use:
>
> if uwsgi.version_info < (0,9,8):
>   raise Exception('req min uWSGI 0.9.8')
>
>
> --
> Łukasz Wróblewski
> http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
> http://www.hostowisko.pl/ - Profesjonalny i tani hosting
> http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to