# HG changeset patch # User Thibaut Girka # Date 1323125878 -3600 # Node ID 9634eefd2063fec1d9d35689e4be59dab1ab1a05 # Parent 577f4545440203c834e443c8220a87f443f4d98d Minor changes to the setup script diff --git a/eclviewer.py b/eclviewer.py old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1,10 +1,11 @@ # -*- encoding: utf-8 -*- import os, sys -#import shutil from distutils.core import setup from distutils.extension import Extension + +# Cython is needed try: from Cython.Distutils import build_ext except ImportError: @@ -12,6 +13,7 @@ except ImportError: 'copy from www.cython.org and install it') sys.exit(1) + packages = [] extensions = [] @@ -20,14 +22,18 @@ for directory, _, files in os.walk('pyto packages.append(package) for filename in files: if filename.endswith('.pyx'): - extensions.append(Extension('%s.%s' % (package, filename[:-4]), - ['%s/%s' % (directory, filename)])) + extension_name = '%s.%s' % (package, os.path.splitext(filename)[0]) + extensions.append(Extension(extension_name, + [os.path.join(directory, filename)])) -#TODO: put eclviewer.py in /usr/bin/ the right way -#shutil.copyfile('eclviewer.py', 'pytouhou/pytouhou') setup(name='PyTouhou', + author='Thibaut Girka', + author_email='thib@sitedethib.com', + url='http://hg.sitedethib.com/touhou/', + license='GPLv3', packages=packages, ext_modules=extensions, - #scripts=['pytouhou/pytouhou'], - cmdclass = {'build_ext': build_ext}) + cmdclass = {'build_ext': build_ext} + ) +