Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
91
Merge Requests
91
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
a1005a67
Commit
a1005a67
authored
Mar 19, 2019
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pyodide amending
parent
803addc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
27 deletions
+23
-27
component/pyodide/buildout.cfg
component/pyodide/buildout.cfg
+23
-27
No files found.
component/pyodide/buildout.cfg
View file @
a1005a67
...
...
@@ -58,21 +58,6 @@ repository = https://lab.nexedi.com/Daetalus/pyodide.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
branch = master
[pytest]
recipe = zc.recipe.egg:custom
egg = pytest
eggs =
python-setuptools
py
six
attrs
funcsigs
pathlib2
pluggy
atomicwrites
more-itertools
pytest-instafail
[pyodide-script]
recipe = slapos.recipe.build
location = ${buildout:parts-directory}/${:_buildout_section_name_}
...
...
@@ -95,15 +80,34 @@ openssl_location = ${openssl:location}
stop-on-error=true
script =
import subprocess, os, shutil
shutil.rmtree(self.options['build_dir'], ignore_errors=True)
env = {
'PKG_CONFIG_PATH':self.options['PKG_CONFIG_PATH'],
'PATH':self.options['PATH'] + ':' + os.environ['PATH'],
'LD_LIBRARY_PATH':self.options['LD_LIBRARY_PATH_EMSDK'],
'C_INCLUDE_PATH':self.options['C_INCLUDE_PATH'],
'PYTHON_EXECUTABLE':self.options['PYTHON_EXECUTABLE'],
'CC':self.options['CC'],
'CXX':self.options['CXX'],
}
if not os.path.isdir(self.options['build_dir']):
command_list_0 = [{'cmd': self.options['git-executable'] + ' clone ' + self.options['repository'] + ' pyodide-script-test', 'cwd': self.options['part_dir']}]
# put the Popen in the loop to let the pipe.wait() work.
for command_0 in command_list_0:
pipe = subprocess.Popen(command_0['cmd'], cwd=command_0['cwd'], env=env, shell=True)
pipe.wait()
# else:
# shutil.rmtree(self.options['build_dir'], ignore_errors=True)
cpython_makefile_command = 'sed -ie "s@./configure --prefix@./configure --with-openssl=' + self.options['openssl_location'] + ' --prefix@" ' + self.options['build_dir'] + '/cpython/Makefile'
disable_package_command = 'rm -rf ' + self.options['build_dir'] + '/packages/'
get_pip = "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py"
install_pip = "python3 get-pip.py"
install_pytest = "pip install pytest selenium pytest-instafail pytest-timeout"
change_python3_name = 'ln -s ' + self.options['PYTHON_EXECUTABLE'] + 'python3 ' + self.options['PYTHON_EXECUTABLE'] + 'python'
command_list = [
{'cmd': self.options['git-executable'] + ' clone ' + self.options['repository'] + ' pyodide-script-test', 'cwd': self.options['part_dir']},
{'cmd': change_python3_name, 'cwd': self.options['build_dir']},
{'cmd': cpython_makefile_command, 'cwd': self.options['build_dir']},
{'cmd': get_pip, 'cwd': self.options['build_dir']},
...
...
@@ -116,17 +120,9 @@ script =
{'cmd': disable_package_command + 'networkx', 'cwd': self.options['build_dir']},
{'cmd': disable_package_command + 'kiwisolver', 'cwd': self.options['build_dir']},
{'cmd': 'python --version && make -C emsdk', 'cwd': self.options['build_dir']},
{'cmd': 'sleep 5', 'cwd': self.options['build_dir']},
{'cmd': 'source ./emsdk/emsdk/emsdk_env.sh', 'cwd': self.options['build_dir']},
]
env = {
'PKG_CONFIG_PATH':self.options['PKG_CONFIG_PATH'],
'PATH':self.options['PATH'] + ':' + os.environ['PATH'],
'LD_LIBRARY_PATH':self.options['LD_LIBRARY_PATH_EMSDK'],
'C_INCLUDE_PATH':self.options['C_INCLUDE_PATH'],
'PYTHON_EXECUTABLE':self.options['PYTHON_EXECUTABLE'],
'CC':self.options['CC'],
'CXX':self.options['CXX'],
}
for command in command_list:
pipe = subprocess.Popen(command['cmd'], cwd=command['cwd'], env=env, shell=True)
...
...
@@ -232,7 +228,7 @@ configure-command = make -e
make-binary =
make-targets = cp -r ./* ${buildout:parts-directory}/${:_buildout_section_name_}
# configure-command = echo ${python3.7.2-PyYAML:location} && echo ${pyodide-cpython:path} && echo ${pyodide-emsdk:path} && echo ${node-uglify-js:location} && echo ${node-less:location}# ${pyodide-packages:path}
configure-command = echo ${python3.7.2-PyYAML:location} && echo ${pyodide-script:path}
configure-command = echo ${python3.7.2-PyYAML:location} && echo ${pyodide-script:path}
# && echo ${pyodide-cpython:path} && echo ${pyodide-emsdk:path} && echo ${node-uglify-js:location} && echo ${node-less:location} && ${pyodide-packages:path}
environment =
PKG_CONFIG_PATH=${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:$PKG_CONFIG_PATH
PATH=${pkgconfig:location}/bin:${freetype:location}/bin:${nodejs:location}/bin/:${f2c:location}/bin:${python3.7.2:location}/bin:${cmake:location}/bin:${ccache:location}/bin:${gcc-8.2:location}/bin:${node-less:location}/node_modules/.bin:${node-uglify-js:location}/node_modules/.bin:${xz-utils:location}/bin:%(PATH)s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment