Skip to content

Commit

Permalink
Adds licence fields to modules endpoint, bump version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed Sep 27, 2017
1 parent 08341e2 commit eecc0ff
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
*.pyc
build/**
venv/**
dist/**
django_anexia_monitoring.egg-info/**
41 changes: 22 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion anexia_monitoring/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = "1.0.0"
__version__ = "1.1.0"
18 changes: 12 additions & 6 deletions anexia_monitoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
AUTHOR = 'Anexia'
LICENSE = 'MIT'
REQUIRED = [
'updatable',
'updatable>=0.2,<0.3',
]
CLASSIFIERS = [
'License :: OSI Approved :: MIT License',
Expand Down Expand Up @@ -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…')
Expand Down

0 comments on commit eecc0ff

Please sign in to comment.