diff --git a/polymorphic/__init__.py b/polymorphic/__init__.py index 128269f9..afd1dfc1 100644 --- a/polymorphic/__init__.py +++ b/polymorphic/__init__.py @@ -6,9 +6,7 @@ Please see LICENSE and AUTHORS for more information. """ -import pkg_resources +VERSION = "3.1.0" -try: - __version__ = pkg_resources.require("django-polymorphic")[0].version -except pkg_resources.DistributionNotFound: - __version__ = None # for RTD among others +# version synonym for backwards compatibility +__version__ = VERSION diff --git a/setup.cfg b/setup.cfg index 09ff55a5..d3ca3dde 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = django-polymorphic -version = 3.1.0 +version = attr: polymorphic.VERSION description = Seamless polymorphic inheritance for Django models long_description = file:README.rst author = Bert Constantin