diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-06-11 22:09:08 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-06-11 22:13:31 +0200 |
commit | 2ad8f56afd6da22e545d2c3427f2186074efe6d8 (patch) | |
tree | 73d1fa48ab3a7d3c4f559d24edccb4e9dbb743ae /recipes | |
parent | 8018a9db158c5c50434d74db54c7fcbbd4b65c5a (diff) |
Add a setuptools recipe
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/pydateutils.recipe | 1 | ||||
-rw-r--r-- | recipes/setuptools.recipe | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes/pydateutils.recipe b/recipes/pydateutils.recipe index 894a6282..6645af2b 100644 --- a/recipes/pydateutils.recipe +++ b/recipes/pydateutils.recipe @@ -8,6 +8,7 @@ class Recipe(recipe.Recipe): 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 = [ diff --git a/recipes/setuptools.recipe b/recipes/setuptools.recipe new file mode 100644 index 00000000..86baee78 --- /dev/null +++ b/recipes/setuptools.recipe @@ -0,0 +1,39 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + + +class Recipe(recipe.Recipe): + name = 'setuptools' + version = '17.1.1' + stype = SourceType.TARBALL + url = 'https://pypi.python.org/packages/source/s/setuptools/setuptools-%(version)s.zip' + # Python Software Foundation License + licenses = [License.BSD_like] + deps = [] + + tarball_name = "setuptools-%(version)s.zip" + btype = BuildType.CUSTOM + files_data = [] + files_bin = ['easy_install*'] + + def prepare(self): + mapping = self.extensions.copy() + mapping["pyprefix"] = self.py_prefix + + self.files_data = [ + '%(pyprefix)s/site-packages/_markerlib/' % mapping, + '%(pyprefix)s/site-packages/pkg_resources/' % mapping, + '%(pyprefix)s/site-packages/setuptools/' % (mapping), + '%(pyprefix)s/site-packages/easy_install.py' % (mapping), + ] + + 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) |