python linted
This commit is contained in:
parent
e562e63c8e
commit
41965be322
15
setup.py
15
setup.py
@ -3,7 +3,8 @@ import os
|
|||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
|
dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
|
||||||
if dir == '': dir = '.'
|
if dir == '':
|
||||||
|
dir = '.'
|
||||||
print(('dir = %s' % dir))
|
print(('dir = %s' % dir))
|
||||||
|
|
||||||
os.chdir(dir)
|
os.chdir(dir)
|
||||||
@ -24,15 +25,18 @@ if os.path.exists(in_file):
|
|||||||
output.write(input.read())
|
output.write(input.read())
|
||||||
output.write('"""\n')
|
output.write('"""\n')
|
||||||
finally:
|
finally:
|
||||||
if input is not None: input.close()
|
if input is not None:
|
||||||
if output is not None: output.close()
|
input.close()
|
||||||
|
if output is not None:
|
||||||
|
output.close()
|
||||||
|
|
||||||
|
|
||||||
# Bootstrap
|
# Bootstrap
|
||||||
try:
|
try:
|
||||||
import ez_setup
|
import ez_setup
|
||||||
ez_setup.use_setuptools()
|
ez_setup.use_setuptools()
|
||||||
except: pass
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
app = 'FAHControl'
|
app = 'FAHControl'
|
||||||
|
|
||||||
@ -91,7 +95,8 @@ else:
|
|||||||
try:
|
try:
|
||||||
version = open('version.txt').read().strip()
|
version = open('version.txt').read().strip()
|
||||||
version.split('.')
|
version.split('.')
|
||||||
except: version = '0.0.0'
|
except:
|
||||||
|
version = '0.0.0'
|
||||||
|
|
||||||
if not os.path.exists('fah/Version.py') or version != '0.0.0':
|
if not os.path.exists('fah/Version.py') or version != '0.0.0':
|
||||||
open('fah/Version.py', 'w').write('version = \'%s\'\n' % version)
|
open('fah/Version.py', 'w').write('version = \'%s\'\n' % version)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user