From d7cf405d2381207a5e3cc58b3e511b580db7c607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 24 Sep 2008 15:47:16 +0200 Subject: [PATCH] Add setup --- setup.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000..05c8479a7f --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python +#This file is part of Tryton. The COPYRIGHT file at the top level of +#this repository contains the full copyright notices and license terms. + +from distutils.core import setup +from distutils.command import sdist + + +class mysdist(sdist.sdist): + + def add_defaults(self): + sdist.sdist.add_defaults(self) + if self.distribution.has_pure_modules(): + build_py = self.get_finalized_command('build_py') + data = [] + for package in build_py.packages: + src_dir = build_py.get_package_dir(package) + data.extend(build_py.find_data_files(package, src_dir)) + self.filelist.extend(data) + +info = eval(file('__tryton__.py').read()) + +requires = ['trytond'] + ['trytond-' + x for x in info.get('depends', [])] + +setup(name='trytond-' + info['name'].lower(), + version=info.get('version', '0'), + description=info.get('description', ''), + author=info.get('author', ''), + author_email=info.get('email', ''), + url=info.get('website', ''), + package_dir={'trytond.modules.' + info['name'].lower(): '.'}, + packages=[ + 'trytond.modules.' + info['name'].lower(), + ], + package_data={ + 'trytond.modules.' + info['name'].lower(): info.get('xml', []) \ + + info.get('translation', []), + }, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Plugins', + 'Intended Audience :: Developers', + 'Intended Audience :: Financial and Insurance Industry', + 'Intended Audience :: Legal Industry', + 'License :: OSI Approved :: GNU General Public License (GPL)', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Office/Business', + 'Topic :: Office/Business :: Financial :: Accounting', + ], + license='GPL-3', + #requires=requires, + cmdclass={ + 'sdist': mysdist, + }, +)