When ./setup.py clean is called, should clean *.pyc too.
This commit is contained in:
parent
55f28f704e
commit
0af99247ba
15
setup.py
15
setup.py
|
@ -22,6 +22,7 @@ import os
|
|||
import sys
|
||||
import subprocess
|
||||
from distutils.core import setup
|
||||
from distutils.command.clean import clean
|
||||
|
||||
laditools_version = "1.0~rc2"
|
||||
get_commit_script = "gitcommit.sh"
|
||||
|
@ -31,6 +32,16 @@ if not os.getenv("LADI_RELEASE") and \
|
|||
commit = subprocess.check_output(["sh", get_commit_script]).strip()
|
||||
laditools_version += "+" + commit
|
||||
|
||||
class clean_extra(clean):
|
||||
def run(self):
|
||||
clean.run(self)
|
||||
|
||||
for path, dirs, files in os.walk('.'):
|
||||
for f in files:
|
||||
f = os.path.join(path, f)
|
||||
if f.endswith('.pyc'):
|
||||
self.spawn(['rm', f])
|
||||
|
||||
setup(name='laditools',
|
||||
version=laditools_version,
|
||||
description='Linux Audio Desktop Integration Tools',
|
||||
|
@ -51,5 +62,7 @@ setup(name='laditools',
|
|||
'data/ladilog_ui.glade',
|
||||
'data/started.svg',
|
||||
'data/starting.svg',
|
||||
'data/stopped.svg'])]
|
||||
'data/stopped.svg'])],
|
||||
cmdclass={
|
||||
'clean' : clean_extra}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue