Added initialisation and version getting function
This commit is contained in:
parent
e4bcda81c9
commit
3f8a9ca11c
3 changed files with 41 additions and 11 deletions
11
details.json
Normal file
11
details.json
Normal 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']
|
||||||
|
}
|
|
@ -1,3 +1,18 @@
|
||||||
|
# Import python modules
|
||||||
|
import os
|
||||||
|
from json import loads as json_loads
|
||||||
|
|
||||||
|
# Import Printr Modules
|
||||||
from .simplePrintr import SimplePrintr
|
from .simplePrintr import SimplePrintr
|
||||||
from .itterPrintr import ItterPrintr
|
from .itterPrintr import ItterPrintr
|
||||||
from .ellipsisPrintr import EllipsisPrintr
|
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
|
||||||
|
|
24
setup.py
24
setup.py
|
@ -1,20 +1,24 @@
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
from json import loads as json_loads
|
||||||
LONG_DESCRIPTION = None
|
LONG_DESCRIPTION = None
|
||||||
try:
|
try:
|
||||||
LONG_DESCRIPTION = open('README.md').read()
|
LONG_DESCRIPTION = open('README.md').read()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
DETAILS = None
|
||||||
|
with open('details.json') as file:
|
||||||
|
DETAILS = json_loads(file)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'Python-Printr',
|
name = DETAILS.name,
|
||||||
packages = ['printr'],
|
packages = DETAILS.packages,
|
||||||
version = '0.0.1',
|
version = DETAILS.version,
|
||||||
description = 'Python module to allow a print line to be updated after printing',
|
description = DETAILS.description,
|
||||||
long_description = LONG_DESCRIPTION,
|
long_description = LONG_DESCRIPTION,
|
||||||
author = 'Jake Howard',
|
author = DETAILS.author,
|
||||||
author_email = 'me@theorangeone.net ',
|
author_email = DETAILS.author_email,
|
||||||
url = 'https://github.com/RealOrangeOne/Printr',
|
url = DETAILS.url,
|
||||||
license='MIT',
|
license = DETAILS.license,
|
||||||
platforms=['any']
|
platforms = DETAILS.platform
|
||||||
)
|
)
|
Reference in a new issue