Added initialisation and version getting function

This commit is contained in:
Jake Howard 2015-09-26 21:38:58 +01:00
parent e4bcda81c9
commit 3f8a9ca11c
3 changed files with 41 additions and 11 deletions

11
details.json Normal file
View file

@ -0,0 +1,11 @@
{
'name' : 'Python-Printr',
'packages' : ['printr'],
'version' : '0.0.1',
'description' : 'Python module to allow a print line to be updated after printing',
'author' : 'Jake Howard',
'author_email' : 'me@theorangeone.net ',
'url' : 'https://github.com/RealOrangeOne/Printr',
'license':'MIT',
'platforms':['any']
}

View file

@ -1,3 +1,18 @@
# Import python modules
import os
from json import loads as json_loads
# Import Printr Modules
from .simplePrintr import SimplePrintr
from .itterPrintr import ItterPrintr
from .ellipsisPrintr import EllipsisPrintr
# Initialise
PRINTR_PATH = os.path.dirname(os.path.abspath(__file__))
with open(PRINTR_PATH + '/details.json') as file:
PRINTR_DETAILS = json_loads(file)
def get_version():
return PRINTR_DETAILS.version

View file

@ -1,20 +1,24 @@
from distutils.core import setup
from json import loads as json_loads
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.md').read()
except:
pass
DETAILS = None
with open('details.json') as file:
DETAILS = json_loads(file)
setup(
name = 'Python-Printr',
packages = ['printr'],
version = '0.0.1',
description = 'Python module to allow a print line to be updated after printing',
name = DETAILS.name,
packages = DETAILS.packages,
version = DETAILS.version,
description = DETAILS.description,
long_description = LONG_DESCRIPTION,
author = 'Jake Howard',
author_email = 'me@theorangeone.net ',
url = 'https://github.com/RealOrangeOne/Printr',
license='MIT',
platforms=['any']
author = DETAILS.author,
author_email = DETAILS.author_email,
url = DETAILS.url,
license = DETAILS.license,
platforms = DETAILS.platform
)