blob: 6645af2b72c1d663d7ef56474b3ea056f2d6768f (
plain)
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
29
30
31
32
33
34
35
36
37
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'py-dateutil'
version = '2.2'
stype = SourceType.TARBALL
url = 'https://pypi.python.org/packages/source/p/py-dateutil/py-dateutil-%(version)s.tar.gz'
licenses = [License.BSD]
deps = ['setuptools']
tarball_name = "py-dateutil-%(version)s.tar.gz"
btype = BuildType.CUSTOM
files_python = [
'site-packages/dateutil/easter.py',
'site-packages/dateutil/tz.py',
'site-packages/dateutil/relativedelta.py',
'site-packages/dateutil/zoneinfo/__init__.py',
'site-packages/dateutil/tzwin.py',
'site-packages/dateutil/parser.py',
'site-packages/dateutil/__init__.py',
'site-packages/dateutil/rrule.py',
]
def install(self):
flags = ""
if self.config.target_platform == Platform.DARWIN:
# numpy / setup.py seems to try to build a universal binary but fails.
# Force it to a single arch for now.
if self.config.target_arch == Architecture.X86:
flags = 'ARCHFLAGS="-arch i386" '
elif self.config.target_arch == Architecture.X86_64:
flags = 'ARCHFLAGS="-arch x86_64" '
shell.call(flags + 'python setup.py install --root / --prefix=%s' %
(self.config.prefix), self.build_dir)
|