diff options
author | jaseg <s@jaseg.de> | 2013-07-29 20:27:21 +0200 |
---|---|---|
committer | jaseg <s@jaseg.de> | 2013-07-29 20:36:39 +0200 |
commit | 72ee91cc54f84d763e0a8c8e4c75758c3105f1bc (patch) | |
tree | e7ab767e6c25684d117d4312fd88f3d789dd6924 | |
parent | 13f954f4ecace0c4888e194c75a26666fa3fc305 (diff) | |
download | ponysay-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-x | setup.py | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -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 = [], ) |