diff --git a/.gitignore b/.gitignore index 0fd8bf1..53fb6a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea *.pyc +build/** venv/** dist/** django_anexia_monitoring.egg-info/** diff --git a/README.rst b/README.rst index d0dfa50..bb6d3d5 100644 --- a/README.rst +++ b/README.rst @@ -80,40 +80,43 @@ Response body: "platform":{ "platform":"python", "framework_installed_version":"1.11.1", - "framework_newest_version":"1.11.2", + "framework_newest_version":"2.0a1", "framework":"django", "platform_version":"3.5.3 (default, Apr 26 2017, 20:12:19) \n[GCC 4.9.2]" }, "modules":[ - { - "newest_version":"0.7.10", - "name":"alabaster", - "installed_version":"0.7.10" - }, { "newest_version":"1.4.3", + "newest_version_licences": [ + "MIT" + ], "name":"appdirs", - "installed_version":"1.4.3" + "installed_version":"1.4.3", + "installed_version_licences": [ + "MIT" + ] }, { "newest_version":"0.22.0", + "newest_version_licences": [ + "MIT" + ], "name":"asn1crypto", - "installed_version":"0.22.0" + "installed_version":"0.22.0", + "installed_version_licences": [ + "MIT" + ], }, { "newest_version":"2.4.0", + "newest_version_licences": [ + "BSD" + ], "name":"Babel", - "installed_version":"2.4.0" - }, - { - "newest_version":"1.10.0", - "name":"cffi", - "installed_version":"1.10.0" - }, - { - "newest_version":"0.7.3", - "name":"CommonMark", - "installed_version":"0.5.4" + "installed_version":"2.4.0", + "installed_version_licences": [ + "BSD" + ], } ] } diff --git a/anexia_monitoring/__version__.py b/anexia_monitoring/__version__.py index 650d6c1..206b1e1 100644 --- a/anexia_monitoring/__version__.py +++ b/anexia_monitoring/__version__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = "1.0.0" +__version__ = "1.1.0" diff --git a/anexia_monitoring/views.py b/anexia_monitoring/views.py index f2190e6..821f238 100644 --- a/anexia_monitoring/views.py +++ b/anexia_monitoring/views.py @@ -49,17 +49,23 @@ def get(self, request, *args, **kwargs): for package in packages: package_data = get_package_update_list(package['package'], package['version']) + modules.append({ + 'name': package['package'], + 'installed_version': package['version'], + 'installed_version_licences': [ + package_data['current_release_license'], + ], + 'newest_version': package_data['latest_release'], + 'newest_version_licences': [ + package_data['latest_release_license'], + ], + }) + if package['package'] == 'Django': django_data = { 'installed_version': package['version'], 'newest_version': package_data['latest_release'], } - else: - modules.append({ - 'name': package['package'], - 'installed_version': package['version'], - 'newest_version': package_data['latest_release'], - }) runtime = { 'platform': 'python', diff --git a/setup.py b/setup.py index aa1ba0a..2d38c17 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ AUTHOR = 'Anexia' LICENSE = 'MIT' REQUIRED = [ - 'updatable', + 'updatable>=0.2,<0.3', ] CLASSIFIERS = [ 'License :: OSI Approved :: MIT License', @@ -71,8 +71,8 @@ def finalize_options(self): def run(self): try: self.status('Removing previous builds…') - rmtree(os.path.join(current_path, 'dist')) - except FileNotFoundError: + rmtree(os.path.join(here, 'dist')) + except OSError: pass self.status('Building Source and Wheel (universal) distribution…')