Skip to content

Commit 6fc4fb9

Browse files
committed
add preppy recipe
1 parent 9109e2f commit 6fc4fb9

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from pythonforandroid.toolchain import PythonRecipe
2+
class PreppyRecipe(PythonRecipe):
3+
version = '27b7085'
4+
url = 'https://bitbucket.org/rptlab/preppy/get/{version}.tar.gz'
5+
depends = []
6+
patches = ['fix-setup.patch']
7+
call_hostpython_via_targetpython = False
8+
9+
recipe = PreppyRecipe()
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--- a/setup.py 2017-11-20 13:53:42.000000000 +0000
2+
+++ b/setup.py 2017-11-20 14:00:44.862203526 +0000
3+
@@ -15,35 +15,6 @@
4+
5+
import preppy
6+
version = preppy.VERSION
7+
- scriptsPath=os.path.join(pkgDir,'build','scripts')
8+
-
9+
- def makeScript(modName):
10+
- try:
11+
- bat=sys.platform in ('win32','amd64')
12+
- scriptPath=os.path.join(scriptsPath,modName+(bat and '.bat' or ''))
13+
- exePath=sys.executable
14+
- f = open(scriptPath,'w')
15+
- try:
16+
- if bat:
17+
- text = '@echo off\nrem startup script for %s-%s\n"%s" -m "%s" %%*\n' % (modName,version,exePath,modName)
18+
- else:
19+
- text = '#!/bin/sh\n#startup script for %s-%s\nexec "%s" -m "%s" $*\n' % (modName,version,exePath,modName)
20+
- f.write(text)
21+
- finally:
22+
- f.close()
23+
- except:
24+
- print('script for %s not created or erroneous' % modName)
25+
- import traceback
26+
- traceback.print_exc(file=sys.stdout)
27+
- return None
28+
- print('Created "%s"' % scriptPath)
29+
- return scriptPath
30+
-
31+
- scripts = []
32+
- if not os.path.isdir(scriptsPath): os.makedirs(scriptsPath)
33+
- scripts.extend(filter(None,[
34+
- makeScript('preppy'),
35+
- ]))
36+
37+
setup(name='preppy',
38+
version=version,
39+
@@ -52,5 +23,4 @@
40+
author_email='andy@reportlab.com',
41+
url='http://bitbucket.org/rptlab/preppy',
42+
py_modules=['preppy'],
43+
- scripts=scripts,
44+
)

0 commit comments

Comments
 (0)