|
4 | 4 | info,
|
5 | 5 | shprint,
|
6 | 6 | )
|
7 |
| -from os.path import join |
8 | 7 | import sh
|
9 | 8 |
|
10 | 9 |
|
11 | 10 | class PyCryptoRecipe(CompiledComponentsPythonRecipe):
|
12 |
| - version = '2.6.1' |
13 |
| - url = 'https://pypi.python.org/packages/source/p/pycrypto/pycrypto-{version}.tar.gz' |
14 |
| - depends = ['openssl', 'python2'] |
| 11 | + version = '2.7a1' |
| 12 | + url = 'https://github.com/dlitz/pycrypto/archive/v{version}.zip' |
| 13 | + depends = ['openssl', ('python2', 'python3')] |
15 | 14 | site_packages_name = 'Crypto'
|
16 |
| - |
| 15 | + call_hostpython_via_targetpython = False |
17 | 16 | patches = ['add_length.patch']
|
18 | 17 |
|
19 |
| - def get_recipe_env(self, arch=None): |
| 18 | + def get_recipe_env(self, arch=None, clang=True): |
20 | 19 | env = super(PyCryptoRecipe, self).get_recipe_env(arch)
|
21 |
| - openssl_build_dir = Recipe.get_recipe('openssl', self.ctx).get_build_dir(arch.arch) |
22 |
| - env['CC'] = '%s -I%s' % (env['CC'], join(openssl_build_dir, 'include')) |
23 |
| - env['LDFLAGS'] = env['LDFLAGS'] + ' -L{}'.format( |
24 |
| - self.ctx.get_libs_dir(arch.arch) + |
25 |
| - '-L{}'.format(self.ctx.libs_dir)) + ' -L{}'.format( |
26 |
| - openssl_build_dir) |
| 20 | + openssl_recipe = Recipe.get_recipe('openssl', self.ctx) |
| 21 | + env['CC'] = env['CC'] + openssl_recipe.include_flags(arch) |
| 22 | + |
| 23 | + env['LDFLAGS'] += ' -L{}'.format(self.ctx.get_libs_dir(arch.arch)) |
| 24 | + env['LDFLAGS'] += ' -L{}'.format(self.ctx.libs_dir) |
| 25 | + env['LDFLAGS'] += openssl_recipe.link_dirs_flags(arch) |
| 26 | + env['LIBS'] = env.get('LIBS', '') + openssl_recipe.link_libs_flags() |
| 27 | + |
27 | 28 | env['EXTRA_CFLAGS'] = '--host linux-armv'
|
28 | 29 | env['ac_cv_func_malloc_0_nonnull'] = 'yes'
|
29 | 30 | return env
|
|
0 commit comments