File tree 1 file changed +10
-1
lines changed
pythonforandroid/recipes/libsodium
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 3
3
from pythonforandroid .logger import shprint
4
4
from multiprocessing import cpu_count
5
5
import sh
6
+ from packaging import version as packaging_version
6
7
7
8
8
9
class LibsodiumRecipe (Recipe ):
9
10
version = '1.0.16'
10
- url = 'https://github.com/jedisct1/libsodium/releases/download/{version }/libsodium-{version }.tar.gz'
11
+ url = 'https://github.com/jedisct1/libsodium/releases/download/{}/libsodium-{}.tar.gz'
11
12
depends = []
12
13
patches = ['size_max_fix.patch' ]
13
14
built_libraries = {'libsodium.so' : 'src/libsodium/.libs' }
14
15
16
+ @property
17
+ def versioned_url (self ):
18
+ asked_version = packaging_version .parse (self .version )
19
+ if asked_version > packaging_version .parse ('1.0.16' ):
20
+ return self ._url .format (self .version + '-RELEASE' , self .version )
21
+ else :
22
+ return self ._url .format (self .version , self .version )
23
+
15
24
def build_arch (self , arch ):
16
25
env = self .get_recipe_env (arch )
17
26
with current_directory (self .get_build_dir (arch .arch )):
You can’t perform that action at this time.
0 commit comments