aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <s@jaseg.de>2013-07-29 20:27:21 +0200
committerjaseg <s@jaseg.de>2013-07-29 20:36:39 +0200
commit72ee91cc54f84d763e0a8c8e4c75758c3105f1bc (patch)
treee7ab767e6c25684d117d4312fd88f3d789dd6924
parent13f954f4ecace0c4888e194c75a26666fa3fc305 (diff)
downloadponysay-72ee91cc54f84d763e0a8c8e4c75758c3105f1bc.tar.gz
ponysay-72ee91cc54f84d763e0a8c8e4c75758c3105f1bc.tar.bz2
ponysay-72ee91cc54f84d763e0a8c8e4c75758c3105f1bc.zip
Fixed the build script. It now generates the ascii art on every run.
-rwxr-xr-xsetup.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/setup.py b/setup.py
index b5c11bd..8e26d93 100755
--- a/setup.py
+++ b/setup.py
@@ -10,23 +10,17 @@ ver = "1.0"
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
-def dir_copy(dirname):
- return (dirname, [dirname+'/'+f for f in os.listdir(dirname)])
+def dir_copy(dirname, src=None):
+ if not src:
+ src = dirname
+ return (dirname, [src+'/'+f for f in os.listdir(src)])
if sys.version_info < (3,0):
print('Oops, only python >= 3.0 supported!')
sys.exit()
-class MakeCommand(distutils.core.Command):
- sub_commands = None
- user_options = []
- def initialize_options(self):
- pass
- def finalize_options(self):
- pass
- def run(self):
- subprocess.call('make')
+subprocess.call('make', cwd=os.path.realpath(os.path.dirname(__file__)))
setup(name = 'ponysay',
version = ver,
@@ -37,7 +31,7 @@ setup(name = 'ponysay',
url = 'https://github.com/jaseg/ponysay',
py_modules = ['ponysay'],
data_files = [dir_copy('quotes'),
- dir_copy('ponies')],
+ dir_copy('ponies', src='genponies')],
scripts = ['ponysay',
'ponythink',
'termcenter',
@@ -58,7 +52,6 @@ setup(name = 'ponysay',
'Topic :: Text Processing :: Filters',
'Topic :: Utilities',
],
- cmdclass = {'build_ext': MakeCommand},
long_description = read('README.md'),
dependency_links = [],
)