From 497e18a2ddbd9a2e1bfbd111f0c7f5e2d47b7a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Oct 2008 15:36:51 +0200 Subject: [PATCH] Use setuptools --- MANIFEST.in | 3 +++ setup.py | 37 ++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000..a71d60265f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include *.xml +include *.odt +include *.csv diff --git a/setup.py b/setup.py index ab7f5b977c..7373a47077 100644 --- a/setup.py +++ b/setup.py @@ -2,27 +2,22 @@ #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) +from setuptools import setup, find_packages +import re info = eval(file('__tryton__.py').read()) -requires = ['trytond'] + ['trytond-' + x for x in info.get('depends', [])] +requires = [] +for dep in info.get('depends', []): + match = re.compile( + '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep) + if match: + dep = 'trytond' + match.group(2) + else: + dep = 'trytond_' + dep + requires.append(dep) -setup(name='trytond-' + info['name'].lower(), +setup(name='trytond_' + info['name'].lower(), version=info.get('version', '0'), description=info.get('description', ''), author=info.get('author', ''), @@ -40,16 +35,16 @@ setup(name='trytond-' + info['name'].lower(), 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', 'Intended Audience :: Developers', + 'Intended Audience :: Financial and Insurance Industry', 'Intended Audience :: Legal Industry', + 'Intended Audience :: Manufacturing', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Natural Language :: English', + 'Natural Language :: German', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Office/Business', ], license='GPL-3', - #requires=requires, - cmdclass={ - 'sdist': mysdist, - }, + install_requires=requires, )