File: numpy_distribution.py

package info (click to toggle)
python-numpy 1%3A1.1.0-3%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,548 kB
  • ctags: 14,321
  • sloc: ansic: 73,119; python: 59,655; cpp: 822; makefile: 179; fortran: 121; f90: 42
file content (28 lines) | stat: -rw-r--r-- 873 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# XXX: Handle setuptools ?
from distutils.core import Distribution

# This class is used because we add new files (sconscripts, and so on) with the
# scons command
class NumpyDistribution(Distribution):
    def __init__(self, attrs = None):
        # A list of (sconscripts, pre_hook, post_hook, src, parent_names)
        self.scons_data = []
        Distribution.__init__(self, attrs)

    def has_scons_scripts(self):
        return bool(self.scons_data)

    def get_scons_scripts(self):
        return [i[0] for i in self.scons_data]

    def get_scons_pre_hooks(self):
        return [i[1] for i in self.scons_data]

    def get_scons_post_hooks(self):
        return [i[2] for i in self.scons_data]

    def get_scons_sources(self):
        return [i[3] for i in self.scons_data]

    def get_scons_parent_names(self):
        return [i[4] for i in self.scons_data]