|
1 | 1 | #!/usr/bin/env python |
| 2 | +from __future__ import absolute_import |
2 | 3 |
|
3 | 4 | from gnatpython import __version__ |
4 | 5 | from setup_helpers import ( |
5 | 6 | build_scripts_gnatpython, build_ext_gnatpython, get_extension_list) |
6 | 7 |
|
7 | | -from distutils.core import setup |
| 8 | +from setuptools import setup, find_packages |
8 | 9 | import distutils.file_util |
9 | 10 |
|
10 | 11 | import glob |
11 | 12 | import os |
12 | 13 |
|
13 | | -old_copy_file = distutils.file_util.copy_file |
14 | | - |
15 | | - |
16 | | -def my_copy_file(src, dst, preserve_mode=1, |
17 | | - preserve_times=1, update=0, link=None, |
18 | | - verbose=0, dry_run=0): |
19 | | - old_copy_file(src, dst, 1, preserve_times, |
20 | | - update, link, verbose, dry_run) |
21 | | - |
22 | | -distutils.file_util.copy_file = my_copy_file |
23 | | - |
24 | | -# Compute the list of data files |
25 | | -data_file_list = [] |
26 | | -for root, _, _ in os.walk('gnatpython/internal/data'): |
27 | | - data_file_list.append( |
28 | | - os.path.relpath(os.path.join(root, '*'), 'gnatpython/internal')) |
29 | | - |
30 | 14 | setup(name='gnatpython', |
31 | 15 | version=__version__, |
32 | 16 | author="AdaCore", |
33 | 17 | author_email="report@adacore.com", |
34 | | - packages=['gnatpython', |
35 | | - 'gnatpython.binarydata', |
36 | | - 'gnatpython.testsuite'], |
37 | | - package_data={'gnatpython.internal': data_file_list}, |
38 | | - cmdclass={'build_scripts': build_scripts_gnatpython(), |
39 | | - 'build_ext': build_ext_gnatpython()}, |
| 18 | + packages=find_packages(), |
40 | 19 | ext_modules=get_extension_list(), |
41 | | - scripts=[f for f in glob.glob('scripts/*') + |
42 | | - glob.glob('scripts/internal/*') |
43 | | - if os.path.isfile(f)], |
44 | | - requires=['requests', 'pep8', 'pyflakes']) |
| 20 | + cmdclass={'build_ext': build_ext_gnatpython(), |
| 21 | + 'build_scripts': build_scripts_gnatpython()}, |
| 22 | + install_requires = ['colorama', 'pyyaml', 'python-dateutil'], |
| 23 | + scripts=[f for f in glob.glob('scripts/*') if os.path.isfile(f)]) |
0 commit comments